diff --git a/files/en-us/_redirects.txt b/files/en-us/_redirects.txt index b81449535708da6..a325ab5658b00b0 100644 --- a/files/en-us/_redirects.txt +++ b/files/en-us/_redirects.txt @@ -521,7 +521,7 @@ /en-US/docs/CSS/Pseudo-elements /en-US/docs/Web/CSS/Pseudo-elements /en-US/docs/CSS/Replaced_element /en-US/docs/Web/CSS/Replaced_element /en-US/docs/CSS/Scaling_background_images /en-US/docs/Web/CSS/CSS_backgrounds_and_borders/Resizing_background_images -/en-US/docs/CSS/Scaling_of_SVG_backgrounds /en-US/docs/Web/CSS/Scaling_of_SVG_backgrounds +/en-US/docs/CSS/Scaling_of_SVG_backgrounds /en-US/docs/Web/CSS/CSS_backgrounds_and_borders/Scaling_of_SVG_backgrounds /en-US/docs/CSS/Shorthand_properties /en-US/docs/Web/CSS/CSS_cascade/Shorthand_properties /en-US/docs/CSS/Specificity /en-US/docs/Web/CSS/CSS_cascade/Specificity /en-US/docs/CSS/Syntax /en-US/docs/Web/CSS/CSS_syntax/Syntax @@ -11992,6 +11992,7 @@ /en-US/docs/Web/CSS/Reference/Mozilla_Extensions /en-US/docs/Web/CSS/Mozilla_Extensions /en-US/docs/Web/CSS/Reference/Webkit_Extensions /en-US/docs/Web/CSS/WebKit_Extensions /en-US/docs/Web/CSS/Reference/object-position /en-US/docs/Web/CSS/object-position +/en-US/docs/Web/CSS/Scaling_of_SVG_backgrounds /en-US/docs/Web/CSS/CSS_backgrounds_and_borders/Scaling_of_SVG_backgrounds /en-US/docs/Web/CSS/Selector_lists /en-US/docs/Web/CSS/Selector_list /en-US/docs/Web/CSS/Selectors /en-US/docs/Web/CSS/CSS_selectors /en-US/docs/Web/CSS/Shorthand_properties /en-US/docs/Web/CSS/CSS_cascade/Shorthand_properties diff --git a/files/en-us/_wikihistory.json b/files/en-us/_wikihistory.json index fad2305b01cf79f..026f719c511d3ff 100644 --- a/files/en-us/_wikihistory.json +++ b/files/en-us/_wikihistory.json @@ -75803,21 +75803,6 @@ "BijuGC" ] }, - "Web/CSS/CSSOM_view/Viewport_concepts": { - "modified": "2020-11-20T07:41:38.029Z", - "contributors": [ - "in43sh", - "PerfectVirgo", - "Wryhder", - "mfuji09", - "bagaffey", - "sivabalan02", - "syntaxval", - "chrisdavidmills", - "estelle", - "ExE-Boss" - ] - }, "Web/CSS/CSSOM_view": { "modified": "2020-10-15T21:38:34.242Z", "contributors": [ @@ -75833,6 +75818,21 @@ "modified": "2020-04-27T22:32:23.815Z", "contributors": ["chrisn", "mfluehr", "JohannesCleve", "Sheppy"] }, + "Web/CSS/CSSOM_view/Viewport_concepts": { + "modified": "2020-11-20T07:41:38.029Z", + "contributors": [ + "in43sh", + "PerfectVirgo", + "Wryhder", + "mfuji09", + "bagaffey", + "sivabalan02", + "syntaxval", + "chrisdavidmills", + "estelle", + "ExE-Boss" + ] + }, "Web/CSS/CSS_Flexible_Box_Layout/Controlling_ratios_of_flex_items_along_main_axis": { "modified": "2020-06-24T00:31:19.661Z", "contributors": [ @@ -76081,6 +76081,16 @@ "mfluehr" ] }, + "Web/CSS/CSS_backgrounds_and_borders/Scaling_of_SVG_backgrounds": { + "modified": "2020-04-27T22:34:13.651Z", + "contributors": [ + "codejockie", + "mfluehr", + "C.Bertolini", + "kscarfone", + "Sheppy" + ] + }, "Web/CSS/CSS_backgrounds_and_borders/Using_multiple_backgrounds": { "modified": "2020-06-24T00:30:00.545Z", "contributors": ["tmhrtwg", "jonjohnjohnson", "mfluehr"] @@ -78634,16 +78644,6 @@ "teoli" ] }, - "Web/CSS/Scaling_of_SVG_backgrounds": { - "modified": "2020-04-27T22:34:13.651Z", - "contributors": [ - "codejockie", - "mfluehr", - "C.Bertolini", - "kscarfone", - "Sheppy" - ] - }, "Web/CSS/Selector_list": { "modified": "2020-10-15T22:23:36.353Z", "contributors": [ diff --git a/files/en-us/learn_web_development/howto/web_mechanics/what_is_a_url/index.md b/files/en-us/learn_web_development/howto/web_mechanics/what_is_a_url/index.md index 0e761cd98e321b5..d12829991bf68cc 100644 --- a/files/en-us/learn_web_development/howto/web_mechanics/what_is_a_url/index.md +++ b/files/en-us/learn_web_development/howto/web_mechanics/what_is_a_url/index.md @@ -125,15 +125,15 @@ The required parts of a URL depend to a great extent on the context in which the When a URL is used within a document, such as in an HTML page, things are a bit different. Because the browser already has the document's own URL, it can use this information to fill in the missing parts of any URL available inside that document. We can differentiate between an _absolute URL_ and a _relative URL_ by looking only at the _path_ part of the URL. If the path part of the URL starts with the `/` character, the browser will fetch that resource from the top root of the server, without reference to the context given by the current document. -Let's look at some examples to make this clearer. Let's assume that the URLs are defined from within the document located at the following URL: `https://developer.mozilla.org/en-US/docs/Learn`. +Let's look at some examples to make this clearer. Let's assume that the URLs are defined from within the document located at the following URL: `https://developer.mozilla.org/en-US/docs/Learn_web_development`. -`https://developer.mozilla.org/en-US/docs/Learn` itself is an absolute URL. It has all necessary parts needed to locate the resource it points to. +`https://developer.mozilla.org/en-US/docs/Learn_web_development` itself is an absolute URL. It has all necessary parts needed to locate the resource it points to. All of the following URLs are relative URLs: -- Scheme-relative URL: `//developer.mozilla.org/en-US/docs/Learn` — only the protocol is missing. The browser will use the same protocol as the one used to load the document hosting that URL. -- Domain-relative URL: `/en-US/docs/Learn` — the protocol and the domain name are both missing. The browser will use the same protocol and the same domain name as the one used to load the document hosting that URL. -- Sub-resources: `Common_questions/Web_mechanics/What_is_a_URL` — the protocol and domain name are missing, and the path doesn't begin with `/`. The browser will attempt to find the document in a subdirectory of the one containing the current resource. In this case, we really want to reach this URL: `https://developer.mozilla.org/en-US/docs/Learn_web_development/Howto/Web_mechanics/What_is_a_URL`. +- Scheme-relative URL: `//developer.mozilla.org/en-US/docs/Learn_web_development` — only the protocol is missing. The browser will use the same protocol as the one used to load the document hosting that URL. +- Domain-relative URL: `/en-US/docs/Learn_web_development` — the protocol and the domain name are both missing. The browser will use the same protocol and the same domain name as the one used to load the document hosting that URL. +- Sub-resources: `Howto/Web_mechanics/What_is_a_URL` — the protocol and domain name are missing, and the path doesn't begin with `/`. The browser will attempt to find the document in a subdirectory of the one containing the current resource. In this case, we really want to reach this URL: `https://developer.mozilla.org/en-US/docs/Learn_web_development/Howto/Web_mechanics/What_is_a_URL`. - Going back in the directory tree: `../CSS/display` — the protocol and domain name are missing, and the path begins with `..`. This is inherited from the UNIX file system world — to tell the browser we want to go up by one level. Here we want to reach this URL: `https://developer.mozilla.org/en-US/docs/Learn_web_development/../Web/CSS/display`, which can be simplified to: `https://developer.mozilla.org/en-US/docs/Web/CSS/display`. - Anchor-only: `#semantic_urls` - all parts are missing except the anchor. The browser will use the current document's URL and replace or add the anchor part to it. This is useful when you want to link to a specific part of the current document. diff --git a/files/en-us/mozilla/firefox/releases/8/index.md b/files/en-us/mozilla/firefox/releases/8/index.md index 10b09a938324cb5..eb2a2871a00a2aa 100644 --- a/files/en-us/mozilla/firefox/releases/8/index.md +++ b/files/en-us/mozilla/firefox/releases/8/index.md @@ -51,7 +51,7 @@ Firefox 8 was released on November 8, 2011. This article provides information bo - Handling of {{ cssxref("background-size") }} has been revised to more closely match the specification. - In the past, {{ cssxref("text-decoration") }} in quirks mode had line thickness and position adjusted on descendant text to match the descendant. Now standards mode and quirks mode rendering are more similar. - Horizontal positioning for elements has been brought more in line with the specification in many cases. Documentation for this is forthcoming, but for now, see [Firefox bug 682780](https://bugzil.la/682780), comment 23 for details. -- [SVG images are now scaled properly](/en-US/docs/Web/CSS/Scaling_of_SVG_backgrounds) when used as background images. +- [SVG images are now scaled properly](/en-US/docs/Web/CSS/CSS_backgrounds_and_borders/Scaling_of_SVG_backgrounds) when used as background images. ### Network diff --git a/files/en-us/web/accessibility/understanding_wcag/keyboard/index.md b/files/en-us/web/accessibility/understanding_wcag/keyboard/index.md index 4090bd9823d079f..eca8d1e2037dca8 100644 --- a/files/en-us/web/accessibility/understanding_wcag/keyboard/index.md +++ b/files/en-us/web/accessibility/understanding_wcag/keyboard/index.md @@ -49,7 +49,7 @@ An element is clickable if it has an `onclick` event handler defined. You can ma ## Interactive elements must be able to be activated using a keyboard -If the user can interact with an element using touch or a pointing device, then the element should also support interacting using the keyboard. That is, if you have defined event handlers for touch or click events, you should also define them for keyboard events. The keyboard event handlers should enable the effectively the same interaction as the touch or click handlers. +If the user can interact with an element using touch or a pointing device, then the element should also support interacting using the keyboard. That is, if you have defined event handlers for touch or click events, you should also define them for keyboard events. The keyboard event handlers should enable effectively the same interaction as the touch or click handlers. ### See also diff --git a/files/en-us/web/api/xmlhttprequest_api/using_xmlhttprequest/index.md b/files/en-us/web/api/xmlhttprequest_api/using_xmlhttprequest/index.md index 05d927bd8c19e90..88f279b305c0e7e 100644 --- a/files/en-us/web/api/xmlhttprequest_api/using_xmlhttprequest/index.md +++ b/files/en-us/web/api/xmlhttprequest_api/using_xmlhttprequest/index.md @@ -227,7 +227,7 @@ And to test: ifHasChanged("your-page.html", function (modified, visit) { console.log( `The page '${this.filepath}' has been changed on ${new Date( - nModified, + modified, ).toLocaleString()}!`, ); }); diff --git a/files/en-us/web/css/background-size/index.md b/files/en-us/web/css/background-size/index.md index 4cf53192d76a73a..784f57388e09f81 100644 --- a/files/en-us/web/css/background-size/index.md +++ b/files/en-us/web/css/background-size/index.md @@ -170,5 +170,5 @@ See [Resizing background images](/en-US/docs/Web/CSS/CSS_backgrounds_and_borders ## See also - [Resizing background images](/en-US/docs/Web/CSS/CSS_backgrounds_and_borders/Resizing_background_images) -- [Scaling of SVG backgrounds](/en-US/docs/Web/CSS/Scaling_of_SVG_backgrounds) +- [Scaling of SVG backgrounds](/en-US/docs/Web/CSS/CSS_backgrounds_and_borders/Scaling_of_SVG_backgrounds) - {{cssxref("object-fit")}} diff --git a/files/en-us/web/css/css_backgrounds_and_borders/index.md b/files/en-us/web/css/css_backgrounds_and_borders/index.md index e9be434de16fc5a..5cd4213c19a9c6a 100644 --- a/files/en-us/web/css/css_backgrounds_and_borders/index.md +++ b/files/en-us/web/css/css_backgrounds_and_borders/index.md @@ -133,7 +133,7 @@ Click "Play" in the example above to see or edit the code for the animation in t - {{cssxref("box-shadow")}} > [!NOTE] -> The CSS Backgrounds Module Level 4 introduces the `background-position-block`, `background-position-inline`, `background-repeat-block`, `background-repeat-inline`, `background-repeat-x`, `background-repeat-y`, and `background-tbd` properties. These have not yet been implemented. +> The CSS backgrounds module level 4 introduces the `background-position-block`, `background-position-inline`, `background-repeat-block`, `background-repeat-inline`, `background-repeat-x`, `background-repeat-y`, and `background-tbd` properties. These have not yet been implemented. ### Data types @@ -141,16 +141,18 @@ Click "Play" in the example above to see or edit the code for the animation in t ## Guides -- [Learn CSS: background and borders](/en-US/docs/Learn_web_development/Core/Styling_basics/Backgrounds_and_borders) - - : Explains how to implement decorative images using CSS background images. - [Using multiple backgrounds](/en-US/docs/Web/CSS/CSS_backgrounds_and_borders/Using_multiple_backgrounds) - - : Explains how to set one or more backgrounds on an element. + - : Setting one or more backgrounds on an element. - [Resizing background images](/en-US/docs/Web/CSS/CSS_backgrounds_and_borders/Resizing_background_images) - - : Describes how to change the size and repeating behavior of background images. -- [Learn CSS: the box model](/en-US/docs/Learn_web_development/Core/Styling_basics/Box_model) - - : Explains how borders, along with other box model properties, impact the CSS box model. + - : Changing the size and repeating behavior of background images. +- [Scaling of SVG backgrounds](/en-US/docs/Web/CSS/CSS_backgrounds_and_borders/Scaling_of_SVG_backgrounds) + - : How SVG aspect ratio, SVG dimension values, and the CSS `background-size` property impact the scaling of SVG background images. - [Using CSS gradients](/en-US/docs/Web/CSS/CSS_images/Using_CSS_gradients) - - : Explains how to create CSS gradient background images. + - : Creating CSS gradients and using them as background images. +- [Learn CSS: background and borders](/en-US/docs/Learn_web_development/Core/Styling_basics/Backgrounds_and_borders) + - : Learn how to implement decorative images using CSS background images. +- [Learn CSS: the box model](/en-US/docs/Learn_web_development/Core/Styling_basics/Box_model) + - : Learn how borders and other box model properties impact the CSS box model. ## Related concepts @@ -189,9 +191,9 @@ Click "Play" in the example above to see or edit the code for the animation in t ## See also -- Interactive tools that let you visually create borders images, rounded corners, and box shadows: - - [Border-image generator](/en-US/docs/Web/CSS/CSS_backgrounds_and_borders/Border-image_generator) - - [Border-radius generator](/en-US/docs/Web/CSS/CSS_backgrounds_and_borders/Border-radius_generator) - - [Box-shadow generator](/en-US/docs/Web/CSS/CSS_backgrounds_and_borders/Box-shadow_generator) -- [Applying color to HTML elements using CSS](/en-US/docs/Web/CSS/CSS_colors/Applying_color), including for borders. -- The [`drop-shadow()`](/en-US/docs/Web/CSS/filter-function/drop-shadow) filter function that applies a drop shadow effect to the input image. The function is used by the {{cssxref("filter")}} and {{cssxref("backdrop-filter")}} properties. +- {{cssxref("filter")}} +- {{cssxref("backdrop-filter")}} +- [`drop-shadow()`](/en-US/docs/Web/CSS/filter-function/drop-shadow) filter function +- [Applying color to HTML elements using CSS](/en-US/docs/Web/CSS/CSS_colors/Applying_color) +- [Border-image generator](/en-US/docs/Web/CSS/CSS_backgrounds_and_borders/Border-image_generator) +- [Border-radius generator](/en-US/docs/Web/CSS/CSS_backgrounds_and_borders/Border-radius_generator) diff --git a/files/en-us/web/css/css_backgrounds_and_borders/resizing_background_images/index.md b/files/en-us/web/css/css_backgrounds_and_borders/resizing_background_images/index.md index c0655c4d2365732..40fde1fe0c23925 100644 --- a/files/en-us/web/css/css_backgrounds_and_borders/resizing_background_images/index.md +++ b/files/en-us/web/css/css_backgrounds_and_borders/resizing_background_images/index.md @@ -135,4 +135,4 @@ The `cover` value specifies that the background image should be sized so that it - {{cssxref("background-size")}} - {{cssxref("background")}} -- [Scaling of SVG backgrounds](/en-US/docs/Web/CSS/Scaling_of_SVG_backgrounds) +- [Scaling of SVG backgrounds](/en-US/docs/Web/CSS/CSS_backgrounds_and_borders/Scaling_of_SVG_backgrounds) diff --git a/files/en-us/web/css/css_backgrounds_and_borders/scaling_of_svg_backgrounds/100px-height-3x4-ratio.svg b/files/en-us/web/css/css_backgrounds_and_borders/scaling_of_svg_backgrounds/100px-height-3x4-ratio.svg new file mode 100644 index 000000000000000..2ac2090c3ee7b5b --- /dev/null +++ b/files/en-us/web/css/css_backgrounds_and_borders/scaling_of_svg_backgrounds/100px-height-3x4-ratio.svg @@ -0,0 +1 @@ + diff --git a/files/en-us/web/css/css_backgrounds_and_borders/scaling_of_svg_backgrounds/100px-wide-no-height-or-ratio.svg b/files/en-us/web/css/css_backgrounds_and_borders/scaling_of_svg_backgrounds/100px-wide-no-height-or-ratio.svg new file mode 100644 index 000000000000000..e8f03e39c6d4fc4 --- /dev/null +++ b/files/en-us/web/css/css_backgrounds_and_borders/scaling_of_svg_backgrounds/100px-wide-no-height-or-ratio.svg @@ -0,0 +1 @@ + diff --git a/files/en-us/web/css/css_backgrounds_and_borders/scaling_of_svg_backgrounds/index.md b/files/en-us/web/css/css_backgrounds_and_borders/scaling_of_svg_backgrounds/index.md new file mode 100644 index 000000000000000..4fc837ccf4c3054 --- /dev/null +++ b/files/en-us/web/css/css_backgrounds_and_borders/scaling_of_svg_backgrounds/index.md @@ -0,0 +1,657 @@ +--- +title: Scaling of SVG backgrounds +slug: Web/CSS/CSS_backgrounds_and_borders/Scaling_of_SVG_backgrounds +page-type: guide +--- + +{{CSSRef}} + +Given the flexibility of SVG images, there's a lot to keep in mind when using them as background images with the {{ cssxref("background-image") }} property, and even more to keep in mind when scaling them using the {{ cssxref("background-size") }} property. This article describes how scaling of SVG images is handled when using these properties. + +## The background sizing algorithm + +The algorithm used to determine the background size of a background image can, for the most part, be summarized by these four rules. There are some edge cases that aren't covered by these rules, but this covers the majority of cases. + +1. If {{ cssxref("background-size") }} specifies a fixed dimension (that is, percentages and relative units are fixed by their context), that dimension wins. +2. If the image has an intrinsic ratio (that is, its width:height ratio is constant, such as 16:9, 4:3, 2.39:1, 1:1, and so forth), the rendered size preserves that ratio. +3. If the image specifies a size, and the size isn't modified by `constrain` or `cover`, that specified size wins. +4. If none of the above cases are met, the image is rendered at the same size as the background area. + +It's worth noting that the background sizing algorithm only cares about the image's dimensions and proportions, or lack thereof. An SVG image with fixed dimensions will be treated just like a raster image of the same size. + +> [!NOTE] +> If you are trying to stretch your SVG to a different {{glossary("aspect ratio")}} with CSS—for example in order to stretch it over the page background—make sure your SVG includes `preserveAspectRatio="none"`. Find out more about {{svgattr("preserveAspectRatio")}}. + +## Source image examples + +Before diving in to look at the results of using different kinds of SVG source images and seeing how they look when used with {{ cssxref("background-size") }}, it will be helpful to look at a few example source images that have different dimensions and sizing settings, which we will later use as our `background-image` values in our examples. The browser renders {{SVGelement("svg")}} images as `300px` wide and `150px` tall by default. + +### Dimensionless and proportionless + +This SVG gradient image is both dimensionless and proportionless. It doesn't care what size it is, nor does it care about remaining at a particular aspect ratio. This would make a good gradient desktop background that would work regardless of your screen size and its aspect ratio. + +```html + + Corner-to-corner gradient + + + + + + + + +``` + +{{ EmbedLiveSample('Dimensionless_and_proportionless', 200, 180) }} + +### One specified dimension and proportionless + +This image specifies a width of 100 pixels but no height or intrinsic ratio. This is, basically, a thin strip of wallpaper that could be stretched across the entire height of a block. + +```html + + Vertical gradient, with a fixed width + + + + + + + + +``` + +{{ EmbedLiveSample('One specified dimension and proportionless', 200, 180) }} + +### One specified dimension with intrinsic ratio + +This image specifies a 100 pixel height but no width. It also specifies an intrinsic aspect ratio of 3:4. This ensures that its width:height ratio is always 3:4, unless it's deliberately scaled to a disproportionate size (that is, by explicitly specifying both width and height that aren't of that ratio). + +This is very much like specifying a specific width and height; since once you have one dimension and a ratio, the other dimension is implied. + +```html + + Vertical gradient, with a fixed height and intrinsic ratio + + + + + + + + +``` + +{{ EmbedLiveSample('One specified dimension with intrinsic ratio', 200, 180) }} + +### No width or height with intrinsic ratio + +This image doesn't specify either a width or a height; instead, it specifies an intrinsic ratio of 1:1. It's always square, and is usable at any size, such as 32x32, 128x128, or 512x512, for example. + +```html + + Intrinsic ratio + + + + + + + + +``` + +{{ EmbedLiveSample('No width or height with intrinsic ratio', 200, 180) }} + +## Scaling examples + +Now let's see some examples of what happens as we apply different scaling to these images. In each of the examples below, the enclosing {{htmlelement("div")}} elements are 300 pixels wide and 200 pixels tall, with a 2 pixel-wide border. To ensure we display the SVG background image only once for these demonstrations, we set {{ cssxref("background-repeat") }} to `no-repeat`. + +```css +div { + width: 300px; + height: 200px; + background-repeat: no-repeat; + border: 2px solid black; +} +``` + +### Specifying fixed lengths for both dimensions + +If you use {{ cssxref("background-size") }} to specify fixed lengths for both dimensions, those lengths are always used, per rule 1 above. In other words, the image will always get stretched to the dimensions you specify, regardless of whether or not the source image has specified its dimensions and/or aspect ratio. + +#### No dimensions or intrinsic ratio + +In this example, the image has no dimensions or intrinsic ratio set: + +```html hidden live-sample___scaling1 +
+``` + +```css hidden live-sample___scaling1 +div { + width: 300px; + height: 200px; + background-repeat: no-repeat; + border: 2px solid black; +} +``` + +```css live-sample___scaling1 +div { + background-image: url(no-dimensions-or-ratio.svg); + background-size: 125px 175px; +} +``` + +{{ EmbedLiveSample('scaling1', 200, 230) }} + +#### One specified dimension, no intrinsic ratio + +In this example, the image has one dimension specified, and no intrinsic ratio set: + +```html hidden live-sample___scaling2 +
+``` + +```css hidden live-sample___scaling2 +div { + width: 300px; + height: 200px; + background-repeat: no-repeat; + border: 2px solid black; +} +``` + +```css live-sample___scaling2 +div { + background-image: url(100px-wide-no-height-or-ratio.svg); + background-size: 250px 150px; +} +``` + +{{ EmbedLiveSample('scaling2', 200, 230) }} + +#### One specified dimension with intrinsic ratio + +```html hidden live-sample___scaling3 +
+``` + +In this example, the image has one dimension explicitly set, along with an intrinsic ratio, meaning both dimensions are effectively defined. Setting an absolute height and width for `background-size` overrides the dimensions set in the SVG: + +```css hidden live-sample___scaling3 +div { + width: 300px; + height: 200px; + background-repeat: no-repeat; + border: 2px solid black; +} +``` + +```css live-sample___scaling3 +div { + background-image: url(100px-height-3x4-ratio.svg); + background-size: 275px 125px; +} +``` + +{{ EmbedLiveSample('scaling3', 200, 230) }} + +#### No specified width or height with intrinsic ratio + +In this example, the image has an intrinsic ratio but no dimensions set: + +```html hidden live-sample___scaling4 +
+``` + +```css hidden live-sample___scaling4 +div { + width: 300px; + height: 200px; + background-repeat: no-repeat; + border: 2px solid black; +} +``` + +```css live-sample___scaling4 +div { + background-image: url(no-dimensions-1x1-ratio.svg); + background-size: 250px 100px; +} +``` + +{{ EmbedLiveSample('scaling4', 200, 230) }} + +### Using contain or cover + +Specifying `cover` for {{ cssxref("background-size") }} makes the picture as small as possible while still covering the entire background area. `contain`, on the other hand, makes the image as large as possible while not being clipped by the background area. + +For an image with an intrinsic ratio, exactly one size matches the `cover`/fit criteria alone. But if there is no intrinsic ratio specified, `cover`/fit isn't sufficient, so the large/small constraints choose the resulting size. + +#### No dimensions or intrinsic ratio + +In this example, the image has no dimensions or intrinsic ratio set. If an image doesn't specify either dimensions or an intrinsic ratio, neither rule 2 nor rule 3 apply, so rule 4 takes over: the background image is rendered covering the entire background area. This satisfies the largest-or-smallest constraint. + +```html hidden live-sample___cc1 +
+``` + +```css hidden live-sample___cc1 +div { + width: 300px; + height: 200px; + background-repeat: no-repeat; + border: 2px solid black; +} +``` + +```css live-sample___cc1 +div { + background-image: url(no-dimensions-or-ratio.svg); + background-size: contain; +} +``` + +{{ EmbedLiveSample('cc1', 200, 230) }} + +#### One specified dimension, no intrinsic ratio + +In this example, with the image having one dimension specified but no intrinsic ratio, rule 4 applies, and the image is scaled to cover the entire background area. + +```html hidden live-sample___cc2 +
+``` + +```css hidden live-sample___cc2 +div { + width: 300px; + height: 200px; + background-repeat: no-repeat; + border: 2px solid black; +} +``` + +```css live-sample___cc2 +div { + background-image: url(100px-wide-no-height-or-ratio.svg); + background-size: contain; +} +``` + +{{ EmbedLiveSample('cc2', 200, 230) }} + +#### One specified dimension with intrinsic ratio + +In these examples, the image has one dimension explicitly set, along with an intrinsic ratio. + +Things change when you specify an intrinsic ratio. In this case, rule 1 isn't relevant, so rule 2 is applied: we try to preserve any intrinsic ratio (while respecting `contain` or `cover`). For example, preserving a 3:4 intrinsic aspect ratio for a 300x200 box with `contain` means drawing a 150x200 background. + +##### contain case + +```html hidden live-sample___cc3 +
+``` + +Given this CSS: + +```css hidden live-sample___cc3 +div { + width: 300px; + height: 200px; + background-repeat: no-repeat; + border: 2px solid black; +} +``` + +```css live-sample___cc3 +div { + background-image: url(100px-height-3x4-ratio.svg); + background-size: contain; +} +``` + +{{ EmbedLiveSample('cc3', 200, 230) }} + +Notice how the entire image is rendered, fitting as best as possible into the box without clipping any of it away. + +##### cover case + +```html hidden live-sample___cc5 +
+``` + +```css hidden live-sample___cc5 +div { + width: 300px; + height: 200px; + background-repeat: no-repeat; + border: 2px solid black; +} +``` + +```css live-sample___cc5 +div { + background-image: url(100px-height-3x4-ratio.svg); + background-size: cover; +} +``` + +{{ EmbedLiveSample('cc5', 200, 230) }} + +Here, the 3:4 ratio is preserved while still stretching the image to fill the entire box. That causes the bottom of the image to be clipped away. + +#### No dimensions with intrinsic ratio + +These example use the image with an intrinsic ratio set but no defined dimensions. When using an image with no intrinsic dimensions but an intrinsic ratio, things work similarly. + +##### contain case + +```html hidden live-sample___cc6 +
+``` + +```css hidden live-sample___cc6 +div { + width: 300px; + height: 200px; + background-repeat: no-repeat; + border: 2px solid black; +} +``` + +```css live-sample___cc6 +div { + background-image: url(no-dimensions-1x1-ratio.svg); + background-size: contain; +} +``` + +{{ EmbedLiveSample('cc6', 200, 230) }} + +Notice that the image is sized to fit the smallest dimension while preserving the 1:1 aspect ratio. + +##### cover case + +```html hidden live-sample___cc7 +
+``` + +```css hidden live-sample___cc7 +div { + width: 300px; + height: 200px; + background-repeat: no-repeat; + border: 2px solid black; +} +``` + +```css live-sample___cc7 +div { + background-image: url(no-dimensions-1x1-ratio.svg); + background-size: cover; +} +``` + +{{ EmbedLiveSample('cc7', 200, 230) }} + +Here, the image is sized so that it fills the largest dimension. The 1:1 aspect ratio has been preserved, although with this source image, that can be difficult to see. + +### Automatic sizing using "auto" for both dimensions + +If {{ cssxref("background-size") }} is set to `auto` or `auto auto`, rule 2 says that rendering must preserve any intrinsic ratio that's provided. + +#### No dimensions or intrinsic ratio + +When auto-sizing background images with no intrinsic ratio or dimensions specified, rule 4 takes effect, and the image is rendered to fill the background area. + +```html hidden live-sample___both-auto1 +
+``` + +```css hidden live-sample___both-auto1 +div { + width: 300px; + height: 200px; + background-repeat: no-repeat; + border: 2px solid black; +} +``` + +```css live-sample___both-auto1 +div { + background-image: url(no-dimensions-or-ratio.svg); + background-size: auto auto; +} +``` + +{{ EmbedLiveSample('both-auto1', 200, 230) }} + +#### One dimension and no intrinsic ratio + +If no intrinsic ratio is specified, but at least one dimension is specified, rule 3 takes effect, and we render the image obeying those dimensions. + +```html hidden live-sample___both-auto2 +
+``` + +```css hidden live-sample___both-auto2 +div { + width: 300px; + height: 200px; + background-repeat: no-repeat; + border: 2px solid black; +} +``` + +```css live-sample___both-auto2 +div { + background-image: url(100px-wide-no-height-or-ratio.svg); + background-size: auto auto; +} +``` + +{{ EmbedLiveSample('both-auto2', 200, 230) }} + +Note here that the width, which is specified in the source SVG at 100 pixels, is obeyed, while the height fills the background area since it's not specified (either explicitly or by an intrinsic ratio). + +#### One dimension and an intrinsic ratio + +If we have an intrinsic ratio with a fixed dimension, that fixes both dimensions in place. As previously mentioned, knowing one dimension and a ratio is the same as specifying both dimensions explicitly. + +```html hidden live-sample___both-auto3 +
+``` + +```css hidden live-sample___both-auto3 +div { + width: 300px; + height: 200px; + background-repeat: no-repeat; + border: 2px solid black; +} +``` + +```css live-sample___both-auto3 +div { + background-image: url(100px-height-3x4-ratio.svg); + background-size: auto auto; +} +``` + +{{ EmbedLiveSample('both-auto3', 200, 230) }} + +Since this image has an explicit height of `100px`. With the 3:4 ratio set in the SVG, in the case of `auto`, the image's width is 75 pixels. + +#### No fixed dimensions with intrinsic ratio + +When an intrinsic ratio is specified, but no dimensions, rule 4 is applied — except that rule 2 also applies. The image is therefore rendered just like for the `contain` case. + +```html hidden live-sample___both-auto4 +
+``` + +```css hidden live-sample___both-auto4 +div { + width: 300px; + height: 200px; + background-repeat: no-repeat; + border: 2px solid black; +} +``` + +```css live-sample___both-auto4 +div { + background-image: url(no-dimensions-1x1-ratio.svg); + background-size: auto auto; +} +``` + +{{ EmbedLiveSample('both-auto4', 200, 230) }} + +### Using "auto" and one specific length + +Given rule 1, specified dimensions are always used, so we need to use our rules only to determine the second dimension. + +#### No dimensions or intrinsic ratio + +If the image has no dimensions or intrinsic ratio, rule 4 applies, and we use the background area's dimension to determine the value for the `auto` dimension. + +```html hidden live-sample___auto0 +
+``` + +```css hidden live-sample___auto0 +div { + width: 300px; + height: 200px; + background-repeat: no-repeat; + border: 2px solid black; +} +``` + +```css live-sample___auto0 +div { + background-image: url(no-dimensions-or-ratio.svg); + background-size: auto 140px; +} +``` + +{{ EmbedLiveSample('auto0', 200, 230) }} + +Here, the width is determined using the background area's width per rule 4, while the height is the `140px` specified in the CSS. + +#### One specified dimension with no intrinsic ratio + +If the image has one specified dimension but no intrinsic ratio, that specified dimension is used per rule 3 if that dimension is set to `auto` in the CSS. + +```html hidden live-sample___auto1 +
+``` + +```css hidden live-sample___auto1 +div { + width: 300px; + height: 200px; + background-repeat: no-repeat; + border: 2px solid black; +} +``` + +```css live-sample___auto1 +div { + background-image: url(100px-wide-no-height-or-ratio.svg); + background-size: 200px auto; +} +``` + +{{ EmbedLiveSample('auto1', 200, 230) }} + +Here, the `200px` specified in the CSS overrides the `100px` width specified in the SVG, per rule 1. Since there's no intrinsic ratio or height provided, `auto` selects the height of the background area as the height for the rendered image. + +```html hidden live-sample___auto2 +
+``` + +```css hidden live-sample___auto2 +div { + width: 300px; + height: 200px; + background-repeat: no-repeat; + border: 2px solid black; +} +``` + +```css live-sample___auto2 +div { + background-image: url(100px-wide-no-height-or-ratio.svg); + background-size: auto 125px; +} +``` + +{{ EmbedLiveSample('auto2', 200, 230) }} + +In this case, the width is specified as `auto` in the CSS, so the `100px` width specified in the SVG is selected, per rule 3. The height is set at `125px` in the CSS, so that is selected per rule 1. + +#### One specified dimension with intrinsic ratio + +When a dimension is specified, rule 1 applies that dimension from the SVG to the rendered background unless specifically overridden by the CSS. When an intrinsic ratio is also specified, that's used to determine the other dimension. + +```html hidden live-sample___auto3 +
+``` + +```css hidden live-sample___auto3 +div { + width: 300px; + height: 200px; + background-repeat: no-repeat; + border: 2px solid black; +} +``` + +```css live-sample___auto3 +div { + background-image: url(100px-height-3x4-ratio.svg); + background-size: 150px auto; +} +``` + +{{ EmbedLiveSample('auto3', 200, 230) }} + +In this case, we use the width of the image specified in the CSS set at `150px`, so rule 1 is applied. The intrinsic 3:4 aspect ratio then determines the height for the `auto` case. + +#### No specified dimensions with intrinsic ratio + +If no dimensions are specified in the SVG, the specified dimension in the CSS is applied, then the intrinsic ratio is used to select the other dimension, per rule 2. + +```html hidden live-sample___auto4 +
+``` + +```css hidden live-sample___auto4 +div { + width: 300px; + height: 200px; + background-repeat: no-repeat; + border: 2px solid black; +} +``` + +```css live-sample___auto4 +div { + background-image: url(no-dimensions-1x1-ratio.svg); + background-size: 150px auto; +} +``` + +{{ EmbedLiveSample('auto4', 200, 230) }} + +The width is set by the CSS to `150px`. The `auto` value for the height is computed using that width and the 1:1 aspect ratio to be `150px` as well. + +## See also + +- {{cssxref("background-size")}} +- [CSS backgrounds and borders](/en-US/docs/Web/CSS/CSS_backgrounds_and_borders) module diff --git a/files/en-us/web/css/css_backgrounds_and_borders/scaling_of_svg_backgrounds/no-dimensions-1x1-ratio.svg b/files/en-us/web/css/css_backgrounds_and_borders/scaling_of_svg_backgrounds/no-dimensions-1x1-ratio.svg new file mode 100644 index 000000000000000..36a042896d3878e --- /dev/null +++ b/files/en-us/web/css/css_backgrounds_and_borders/scaling_of_svg_backgrounds/no-dimensions-1x1-ratio.svg @@ -0,0 +1,10 @@ + + Intrinsic ratio + + + + + + + + diff --git a/files/en-us/web/css/css_backgrounds_and_borders/scaling_of_svg_backgrounds/no-dimensions-or-ratio.svg b/files/en-us/web/css/css_backgrounds_and_borders/scaling_of_svg_backgrounds/no-dimensions-or-ratio.svg new file mode 100644 index 000000000000000..aa13c37b067dd7a --- /dev/null +++ b/files/en-us/web/css/css_backgrounds_and_borders/scaling_of_svg_backgrounds/no-dimensions-or-ratio.svg @@ -0,0 +1 @@ + diff --git a/files/en-us/web/css/scaling_of_svg_backgrounds/100px-height-3x4-ratio-contain.png b/files/en-us/web/css/scaling_of_svg_backgrounds/100px-height-3x4-ratio-contain.png deleted file mode 100644 index 062fcb33e26693c..000000000000000 Binary files a/files/en-us/web/css/scaling_of_svg_backgrounds/100px-height-3x4-ratio-contain.png and /dev/null differ diff --git a/files/en-us/web/css/scaling_of_svg_backgrounds/100px-height-3x4-ratio-cover.png b/files/en-us/web/css/scaling_of_svg_backgrounds/100px-height-3x4-ratio-cover.png deleted file mode 100644 index 75ee690a8e1d45c..000000000000000 Binary files a/files/en-us/web/css/scaling_of_svg_backgrounds/100px-height-3x4-ratio-cover.png and /dev/null differ diff --git a/files/en-us/web/css/scaling_of_svg_backgrounds/100px-height-3x4-ratio.png b/files/en-us/web/css/scaling_of_svg_backgrounds/100px-height-3x4-ratio.png deleted file mode 100644 index a2bf2d497101260..000000000000000 Binary files a/files/en-us/web/css/scaling_of_svg_backgrounds/100px-height-3x4-ratio.png and /dev/null differ diff --git a/files/en-us/web/css/scaling_of_svg_backgrounds/100px-wide-no-height-or-ratio-auto-length.png b/files/en-us/web/css/scaling_of_svg_backgrounds/100px-wide-no-height-or-ratio-auto-length.png deleted file mode 100644 index 75afd613cf3187c..000000000000000 Binary files a/files/en-us/web/css/scaling_of_svg_backgrounds/100px-wide-no-height-or-ratio-auto-length.png and /dev/null differ diff --git a/files/en-us/web/css/scaling_of_svg_backgrounds/100px-wide-no-height-or-ratio-contain.png b/files/en-us/web/css/scaling_of_svg_backgrounds/100px-wide-no-height-or-ratio-contain.png deleted file mode 100644 index 857c4c8ad5507de..000000000000000 Binary files a/files/en-us/web/css/scaling_of_svg_backgrounds/100px-wide-no-height-or-ratio-contain.png and /dev/null differ diff --git a/files/en-us/web/css/scaling_of_svg_backgrounds/100px-wide-no-height-or-ratio-length-auto.png b/files/en-us/web/css/scaling_of_svg_backgrounds/100px-wide-no-height-or-ratio-length-auto.png deleted file mode 100644 index e0417d1d59ce17b..000000000000000 Binary files a/files/en-us/web/css/scaling_of_svg_backgrounds/100px-wide-no-height-or-ratio-length-auto.png and /dev/null differ diff --git a/files/en-us/web/css/scaling_of_svg_backgrounds/100px-wide-no-height-or-ratio.png b/files/en-us/web/css/scaling_of_svg_backgrounds/100px-wide-no-height-or-ratio.png deleted file mode 100644 index 9200b16e3ef6933..000000000000000 Binary files a/files/en-us/web/css/scaling_of_svg_backgrounds/100px-wide-no-height-or-ratio.png and /dev/null differ diff --git a/files/en-us/web/css/scaling_of_svg_backgrounds/1auto-100px-height-3x4-ratio.png b/files/en-us/web/css/scaling_of_svg_backgrounds/1auto-100px-height-3x4-ratio.png deleted file mode 100644 index 985b17740571e73..000000000000000 Binary files a/files/en-us/web/css/scaling_of_svg_backgrounds/1auto-100px-height-3x4-ratio.png and /dev/null differ diff --git a/files/en-us/web/css/scaling_of_svg_backgrounds/1auto-no-dimensions-1x1-ratio.png b/files/en-us/web/css/scaling_of_svg_backgrounds/1auto-no-dimensions-1x1-ratio.png deleted file mode 100644 index 89244b1d6f4525a..000000000000000 Binary files a/files/en-us/web/css/scaling_of_svg_backgrounds/1auto-no-dimensions-1x1-ratio.png and /dev/null differ diff --git a/files/en-us/web/css/scaling_of_svg_backgrounds/1auto-no-dimensions-or-ratio.png b/files/en-us/web/css/scaling_of_svg_backgrounds/1auto-no-dimensions-or-ratio.png deleted file mode 100644 index b315e52db3513c1..000000000000000 Binary files a/files/en-us/web/css/scaling_of_svg_backgrounds/1auto-no-dimensions-or-ratio.png and /dev/null differ diff --git a/files/en-us/web/css/scaling_of_svg_backgrounds/auto-100px-height-3x4-ratio.png b/files/en-us/web/css/scaling_of_svg_backgrounds/auto-100px-height-3x4-ratio.png deleted file mode 100644 index 5f0d7d08d8bd277..000000000000000 Binary files a/files/en-us/web/css/scaling_of_svg_backgrounds/auto-100px-height-3x4-ratio.png and /dev/null differ diff --git a/files/en-us/web/css/scaling_of_svg_backgrounds/auto-100px-wide-no-height-or-ratio.png b/files/en-us/web/css/scaling_of_svg_backgrounds/auto-100px-wide-no-height-or-ratio.png deleted file mode 100644 index 68b3cf8995a1c65..000000000000000 Binary files a/files/en-us/web/css/scaling_of_svg_backgrounds/auto-100px-wide-no-height-or-ratio.png and /dev/null differ diff --git a/files/en-us/web/css/scaling_of_svg_backgrounds/auto-no-dimensions-1x1-ratio.png b/files/en-us/web/css/scaling_of_svg_backgrounds/auto-no-dimensions-1x1-ratio.png deleted file mode 100644 index ff4d1e5080d612b..000000000000000 Binary files a/files/en-us/web/css/scaling_of_svg_backgrounds/auto-no-dimensions-1x1-ratio.png and /dev/null differ diff --git a/files/en-us/web/css/scaling_of_svg_backgrounds/auto-no-dimensions-or-ratio.png b/files/en-us/web/css/scaling_of_svg_backgrounds/auto-no-dimensions-or-ratio.png deleted file mode 100644 index 3060b9abe926359..000000000000000 Binary files a/files/en-us/web/css/scaling_of_svg_backgrounds/auto-no-dimensions-or-ratio.png and /dev/null differ diff --git a/files/en-us/web/css/scaling_of_svg_backgrounds/fixed-100px-height-3x4-ratio.png b/files/en-us/web/css/scaling_of_svg_backgrounds/fixed-100px-height-3x4-ratio.png deleted file mode 100644 index 5333a52bceefc39..000000000000000 Binary files a/files/en-us/web/css/scaling_of_svg_backgrounds/fixed-100px-height-3x4-ratio.png and /dev/null differ diff --git a/files/en-us/web/css/scaling_of_svg_backgrounds/fixed-100px-wide-no-height-or-ratio.png b/files/en-us/web/css/scaling_of_svg_backgrounds/fixed-100px-wide-no-height-or-ratio.png deleted file mode 100644 index 3a330589212d2b0..000000000000000 Binary files a/files/en-us/web/css/scaling_of_svg_backgrounds/fixed-100px-wide-no-height-or-ratio.png and /dev/null differ diff --git a/files/en-us/web/css/scaling_of_svg_backgrounds/fixed-no-dimensions-1x1-ratio.png b/files/en-us/web/css/scaling_of_svg_backgrounds/fixed-no-dimensions-1x1-ratio.png deleted file mode 100644 index c535212f425313b..000000000000000 Binary files a/files/en-us/web/css/scaling_of_svg_backgrounds/fixed-no-dimensions-1x1-ratio.png and /dev/null differ diff --git a/files/en-us/web/css/scaling_of_svg_backgrounds/fixed-no-dimensions-or-ratio.png b/files/en-us/web/css/scaling_of_svg_backgrounds/fixed-no-dimensions-or-ratio.png deleted file mode 100644 index 5f99ab288ec514c..000000000000000 Binary files a/files/en-us/web/css/scaling_of_svg_backgrounds/fixed-no-dimensions-or-ratio.png and /dev/null differ diff --git a/files/en-us/web/css/scaling_of_svg_backgrounds/index.md b/files/en-us/web/css/scaling_of_svg_backgrounds/index.md deleted file mode 100644 index c197244fdc4af1a..000000000000000 --- a/files/en-us/web/css/scaling_of_svg_backgrounds/index.md +++ /dev/null @@ -1,348 +0,0 @@ ---- -title: Scaling of SVG backgrounds -slug: Web/CSS/Scaling_of_SVG_backgrounds -page-type: guide ---- - -{{CSSRef}} - -Given the flexibility of SVG images, there's a lot to keep in mind when using them as background images with the {{ cssxref("background-image") }} property, and even more to keep in mind when also scaling them using the {{ cssxref("background-size") }} property. This article describes how scaling of SVG images is handled when using these properties. - -## The algorithm, in summary - -The algorithm can for the most part be summarized by these four rules. There are some edge cases that aren't covered by these rules, but this covers the majority of cases. - -1. If {{ cssxref("background-size") }} specifies a fixed dimension (that is, percentages and relative units are fixed by their context), that dimension wins. -2. If the image has an intrinsic ratio (that is, its width:height ratio is constant, such as 16:9, 4:3, 2.39:1, 1:1, and so forth), the rendered size preserves that ratio. -3. If the image specifies a size, and the size isn't modified by constrain or cover, that specified size wins. -4. If none of the above cases are met, the image is rendered at the same size as the background area. - -It's worth noting that the sizing algorithm only cares about the image's dimensions and proportions, or lack thereof. An SVG image with fixed dimensions will be treated just like a raster image of the same size. - -> [!NOTE] -> If you are trying to stretch your SVG to a different {{glossary("aspect ratio")}} with CSS—for example in order to stretch it over the page background—make sure your SVG includes `preserveAspectRatio="none"`. Find out more about {{svgattr("preserveAspectRatio")}}. - -## Source image examples - -Before diving in to look at the results of using different kinds of source images and seeing how they look when used with {{ cssxref("background-size") }}, it would be helpful to look at a few example source images that have different dimensions and sizing settings. - -In each case, we show what the source image looks like rendered in a 150x150 box, and provide a link to the SVG source. - -### Dimensionless and proportionless - -This image is both dimensionless and proportionless. It doesn't care what size it is, nor does it care about remaining at a particular aspect ratio. This would make a good gradient desktop background that would work regardless of your screen size and its aspect ratio. - -![no-dimensions-or-ratio.png](no-dimensions-or-ratio.png) - -[SVG source](https://mdn.dev/archives/media/attachments/2012/07/09/3469/6587a382ffb2c944462a6b110b079496/no-dimensions-or-ratio.svg) - -### One specified dimension and proportionless - -This image specifies a width of 100 pixels but no height or intrinsic ratio. This is, basically, a thin strip of wallpaper that could be stretched across the entire height of a block. - -![100px-wide-no-height-or-ratio.png](100px-wide-no-height-or-ratio.png) - -[SVG source](https://mdn.dev/archives/media/attachments/2012/07/09/3468/af73bea307a10ffe2559df42fad199e3/100px-wide-no-height-or-ratio.svg) - -### One specified dimension with intrinsic ratio - -This image specifies a 100 pixel height but no width. It also specifies an intrinsic aspect ratio of 3:4. This ensures that its width:height ratio is always 3:4, unless it's deliberately scaled to a disproportionate size (that is, by explicitly specifying both width and height that aren't of that ratio). - -This is very much like specifying a specific width and height, since once you have one dimension and a ratio, the other dimension is implied, but it's still a useful example. - -![100px-height-3x4-ratio.png](100px-height-3x4-ratio.png) - -[SVG source](https://mdn.dev/archives/media/attachments/2012/07/09/3467/fd0c534c506be06d52f0a954a59863a6/100px-height-3x4-ratio.svg) - -### No width or height with intrinsic ratio - -This image doesn't specify either a width or a height; instead, it specifies an intrinsic ratio of 1:1. Think of this like a program icon. It's always square, and is usable at any size, such as 32x32, 128x128, or 512x512, for example. - -![no-dimensions-1x1-ratio.png](no-dimensions-1x1-ratio.png) - -[SVG source](https://mdn.dev/archives/media/attachments/2012/07/09/3466/a3398e03c058d99fb2b7837167cdbc26/no-dimensions-1x1-ratio.svg) - -## Scaling examples - -Now let's see some examples of what happens as we apply different scaling to these images. In each of the examples below, the enclosing rectangles are 300 pixels wide and 200 pixels tall. In addition, the backgrounds have {{ cssxref("background-repeat") }} set to no-repeat for clarity. - -> [!NOTE] -> The screenshots below show the **expected** rendering. Not all browsers currently render these correctly. - -### Specifying fixed lengths for both dimensions - -If you use {{ cssxref("background-size") }} to specify fixed lengths for both dimensions, those lengths are always used, per rule 1 above. In other words, the image will always get stretched to the dimensions you specify, regardless of whether or not the source image has specified its dimensions and/or aspect ratio. - -#### Source: No dimensions or intrinsic ratio - -Given this CSS: - -```css -background: url(no-dimensions-or-ratio.svg); -background-size: 125px 175px; -``` - -The rendered output would look like this: - -![fixed-no-dimensions-or-ratio.png](fixed-no-dimensions-or-ratio.png) - -#### Source: One specified dimension, no intrinsic ratio - -Given this CSS: - -```css -background: url(100px-wide-no-height-or-ratio.svg); -background-size: 250px 150px; -``` - -The rendered output would look like this: - -![fixed-100px-wide-no-height-or-ratio.png](fixed-100px-wide-no-height-or-ratio.png) - -#### Source: One specified dimension with intrinsic ratio - -Given this CSS: - -```css -background: url(100px-height-3x4-ratio.svg); -background-size: 275px 125px; -``` - -The rendered output would look like this: - -![fixed-100px-height-3x4-ratio.png](fixed-100px-height-3x4-ratio.png) - -#### Source: No specified width or height with intrinsic ratio - -Given this CSS: - -```css -background: url(no-dimensions-1x1-ratio.svg); -background-size: 250px 100px; -``` - -The rendered output would look like this: - -![fixed-no-dimensions-1x1-ratio.png](fixed-no-dimensions-1x1-ratio.png) - -### Using contain or cover - -Specifying `cover` for {{ cssxref("background-size") }} makes the picture as small as possible while still covering the entire background area. `contain`, on the other hand, makes the image as large as possible while not being clipped by the background area. - -For an image with an intrinsic ratio, exactly one size matches the `cover`/fit criteria alone. But if there is no intrinsic ratio specified, `cover`/fit isn't sufficient, so the large/small constraints choose the resulting size. - -#### Source: No dimensions or intrinsic ratio - -If an image doesn't specify either dimensions or an intrinsic ratio, neither rule 2 nor rule 3 apply, so rule 4 takes over: the background image is rendered covering the entire background area. This satisfies the largest-or-smallest constraint. - -```css -background: url(no-dimensions-or-ratio.svg); -background-size: contain; -``` - -The rendered output looks like this: - -![no-dimensions-or-ratio-contain.png](no-dimensions-or-ratio-contain.png) - -#### Source: One specified dimension, no intrinsic ratio - -Similarly, if the image has one dimension specified but no intrinsic ratio, rule 4 applies, and the image is scaled to cover the entire background area. - -```css -background: url(100px-wide-no-height-or-ratio.svg); -background-size: contain; -``` - -The rendered output looks like this: - -![100px-wide-no-height-or-ratio-contain.png](100px-wide-no-height-or-ratio-contain.png) - -#### Source: One specified dimension with intrinsic ratio - -Things change when you specify an intrinsic ratio. In this case, rule 1 isn't relevant, so rule 2 is applied: we try to preserve any intrinsic ratio (while respecting `contain` or `cover`). For example, preserving a 3:4 intrinsic aspect ratio for a 300x200 box with `contain` means drawing a 150x200 background. - -##### contain case - -```css -background: url(100px-height-3x4-ratio.svg); -background-size: contain; -``` - -The rendered output looks like this: - -![100px-height-3x4-ratio-contain.png](100px-height-3x4-ratio-contain.png) - -Notice how the entire image is rendered, fitting as best as possible into the box without clipping any of it away. - -##### cover case - -```css -background: url(100px-height-3x4-ratio.svg); -background-size: cover; -``` - -The rendered output looks like this: - -![100px-height-3x4-ratio-cover.png](100px-height-3x4-ratio-cover.png) - -Here, the 3:4 ratio is preserved while still stretching the image to fill the entire box. That causes the bottom of the image to be clipped away. - -#### Source: No dimensions with intrinsic ratio - -When using an image with no intrinsic dimensions but an intrinsic ratio, things work similarly. - -##### contain case - -```css -background: url(no-dimensions-1x1-ratio.svg); -background-size: contain; -``` - -The rendered output looks like this: - -![no-dimensions-1x1-ratio-contain.png](no-dimensions-1x1-ratio-contain.png) - -Notice that the image is sized to fit the smallest dimension while preserving the 1:1 aspect ratio. - -##### cover case - -```css -background: url(no-dimensions-1x1-ratio.svg); -background-size: cover; -``` - -The rendered output looks like this: - -![no-dimensions-1x1-ratio-cover.png](no-dimensions-1x1-ratio-cover.png) - -Here, the image is sized so that it fills the largest dimension. The 1:1 aspect ratio has been preserved, although with this source image, that can be difficult to see. - -### Automatic sizing using "auto" for both dimensions - -If {{ cssxref("background-size") }} is set to `auto` or `auto auto`, rule 2 says that rendering must preserve any intrinsic ratio that's provided. - -#### Source: No dimensions or intrinsic ratio - -When no intrinsic ratio or dimensions are specified by the source image, rule 4 takes effect, and the image is rendered to fill the background area. - -```css -background: url(no-dimensions-or-ratio.svg); -background-size: auto auto; -``` - -The rendered output looks like this: - -![auto-no-dimensions-or-ratio.png](auto-no-dimensions-or-ratio.png) - -#### Source: One dimension and no intrinsic ratio - -If no intrinsic ratio is specified, but at least one dimension is specified, rule 3 takes effect, and we render the image obeying those dimensions. - -```css -background: url(100px-wide-no-height-or-ratio.svg); -background-size: auto auto; -``` - -The rendered output looks like this: - -![auto-100px-wide-no-height-or-ratio.png](auto-100px-wide-no-height-or-ratio.png) - -Note here that the width, which is specified in the source SVG at 100 pixels, is obeyed, while the height fills the background area since it's not specified (either explicitly or by an intrinsic ratio). - -#### Source: One dimension and an intrinsic ratio - -If we have an intrinsic ratio with a fixed dimension, that fixes both dimensions in place. Knowing one dimension and a ratio is, as has been mentioned already, the same as specifying both dimensions explicitly. - -```css -background: url(100px-height-3x4-ratio.svg); -background-size: auto auto; -``` - -The rendered output looks like this: - -![auto-100px-height-3x4-ratio.png](auto-100px-height-3x4-ratio.png) - -Since this image has an explicit 100 pixel height, the 3:4 ratio explicitly sets its width at 75 pixels, so that's how it's rendered in the `auto` case. - -#### Source: No fixed dimensions with intrinsic ratio - -When an intrinsic ratio is specified, but no dimensions, rule 4 is applied — except that rule 2 also applies. The image is therefore rendered just like for the `contain` case. - -```css -background: url(no-dimensions-1x1-ratio.svg); -background-size: auto auto; -``` - -The rendered output looks like this: - -![auto-no-dimensions-1x1-ratio.png](auto-no-dimensions-1x1-ratio.png) - -### Using "auto" and one specific length - -Given rule 1, specified dimensions are always used, so we need to use our rules only to determine the second dimension. - -#### Source: No dimensions or intrinsic ratio - -If the image has no dimensions or intrinsic ratio, rule 4 applies, and we use the background area's dimension to determine the value for the `auto` dimension. - -```css -background: url(no-dimensions-or-ratio.svg); -background-size: auto 150px; -``` - -![1auto-no-dimensions-or-ratio.png](1auto-no-dimensions-or-ratio.png) - -Here, the width is determined using the background area's width per rule 4, while the height is the 140px specified in the CSS. - -#### Source: One specified dimension with no intrinsic ratio - -If the image has one specified dimension but no intrinsic ratio, that specified dimension is used per rule 3 if that dimension is set to `auto` in the CSS. - -```css -background: url(100px-wide-no-height-or-ratio.svg); -background-size: 200px auto; -``` - -![100px-wide-no-height-or-ratio-length-auto.png](100px-wide-no-height-or-ratio-length-auto.png) - -Here, the 200px specified in the CSS overrides the 100px width specified in the SVG, per rule 1. Since there's no intrinsic ratio or height provided, `auto` selects the height of the background area as the height for the rendered image. - -```css -background: url(100px-wide-no-height-or-ratio.svg); -background-size: auto 125px; -``` - -![100px-wide-no-height-or-ratio-auto-length.png](100px-wide-no-height-or-ratio-auto-length.png) - -In this case, the width is specified as auto in the CSS, so the 100px width specified in the SVG is selected, per rule 3. The height is set at 125px in the CSS, so that is selected per rule 1. - -#### Source: One specified dimension with intrinsic ratio - -When a dimension is specified, rule 1 applies that dimension from the SVG to the rendered background unless specifically overridden by the CSS. When an intrinsic ratio is also specified, that's used to determine the other dimension. - -```css -background: url(100px-height-3x4-ratio.svg); -background-size: 150px auto; -``` - -![1auto-100px-height-3x4-ratio.png](1auto-100px-height-3x4-ratio.png) - -In this case, we use the width of the image specified in the CSS set at 150px, so rule 1 is applied. The intrinsic 3:4 aspect ratio then determines the height for the `auto` case. - -#### Source: No specified dimensions with intrinsic ratio - -If no dimensions are specified in the SVG, the specified dimension in the CSS is applied, then the intrinsic ratio is used to select the other dimension, per rule 2. - -```css -background: url(no-dimensions-1x1-ratio.svg); -background-size: 150px auto; -``` - -![1auto-no-dimensions-1x1-ratio.png](1auto-no-dimensions-1x1-ratio.png) - -The width is set by the CSS to 150px. The `auto` value for the height is computed using that width and the 1:1 aspect ratio to be 150px as well, resulting in the image above. - -## See also - -- {{cssxref("background-size")}} -- Blog post: [Properly resizing vector image backgrounds](https://whereswalden.com/2011/10/21/properly-resizing-vector-image-backgrounds/) diff --git a/files/en-us/web/css/scaling_of_svg_backgrounds/no-dimensions-1x1-ratio-contain.png b/files/en-us/web/css/scaling_of_svg_backgrounds/no-dimensions-1x1-ratio-contain.png deleted file mode 100644 index a6466a252b1d13f..000000000000000 Binary files a/files/en-us/web/css/scaling_of_svg_backgrounds/no-dimensions-1x1-ratio-contain.png and /dev/null differ diff --git a/files/en-us/web/css/scaling_of_svg_backgrounds/no-dimensions-1x1-ratio-cover.png b/files/en-us/web/css/scaling_of_svg_backgrounds/no-dimensions-1x1-ratio-cover.png deleted file mode 100644 index d6417999d8d23c3..000000000000000 Binary files a/files/en-us/web/css/scaling_of_svg_backgrounds/no-dimensions-1x1-ratio-cover.png and /dev/null differ diff --git a/files/en-us/web/css/scaling_of_svg_backgrounds/no-dimensions-1x1-ratio.png b/files/en-us/web/css/scaling_of_svg_backgrounds/no-dimensions-1x1-ratio.png deleted file mode 100644 index 8ca13ab2f29811e..000000000000000 Binary files a/files/en-us/web/css/scaling_of_svg_backgrounds/no-dimensions-1x1-ratio.png and /dev/null differ diff --git a/files/en-us/web/css/scaling_of_svg_backgrounds/no-dimensions-or-ratio-contain.png b/files/en-us/web/css/scaling_of_svg_backgrounds/no-dimensions-or-ratio-contain.png deleted file mode 100644 index 5c565a8e47e748f..000000000000000 Binary files a/files/en-us/web/css/scaling_of_svg_backgrounds/no-dimensions-or-ratio-contain.png and /dev/null differ diff --git a/files/en-us/web/css/scaling_of_svg_backgrounds/no-dimensions-or-ratio.png b/files/en-us/web/css/scaling_of_svg_backgrounds/no-dimensions-or-ratio.png deleted file mode 100644 index dbd91c656785577..000000000000000 Binary files a/files/en-us/web/css/scaling_of_svg_backgrounds/no-dimensions-or-ratio.png and /dev/null differ diff --git a/files/en-us/web/javascript/reference/global_objects/aggregateerror/aggregateerror/index.md b/files/en-us/web/javascript/reference/global_objects/aggregateerror/aggregateerror/index.md index dace99d9c11205c..d04fcb9827351ae 100644 --- a/files/en-us/web/javascript/reference/global_objects/aggregateerror/aggregateerror/index.md +++ b/files/en-us/web/javascript/reference/global_objects/aggregateerror/aggregateerror/index.md @@ -61,4 +61,5 @@ try { ## See also - [Polyfill of `AggregateError` in `core-js`](https://github.com/zloirock/core-js#ecmascript-promise) +- [es-shims polyfill of `AggregateError`](https://www.npmjs.com/package/es-aggregate-error) - {{jsxref("Promise.any")}} diff --git a/files/en-us/web/javascript/reference/global_objects/aggregateerror/index.md b/files/en-us/web/javascript/reference/global_objects/aggregateerror/index.md index c5c90669b6f4479..03d4c3c08495ad4 100644 --- a/files/en-us/web/javascript/reference/global_objects/aggregateerror/index.md +++ b/files/en-us/web/javascript/reference/global_objects/aggregateerror/index.md @@ -73,5 +73,6 @@ try { ## See also - [Polyfill of `AggregateError` in `core-js`](https://github.com/zloirock/core-js#ecmascript-promise) +- [es-shims polyfill of `AggregateError`](https://www.npmjs.com/package/es-aggregate-error) - {{jsxref("Error")}} - {{jsxref("Promise.any")}} diff --git a/files/en-us/web/javascript/reference/global_objects/array/at/index.md b/files/en-us/web/javascript/reference/global_objects/array/at/index.md index 17907335f3105a8..8a122eefba31719 100644 --- a/files/en-us/web/javascript/reference/global_objects/array/at/index.md +++ b/files/en-us/web/javascript/reference/global_objects/array/at/index.md @@ -122,6 +122,7 @@ console.log(Array.prototype.at.call(arrayLike, 2)); // undefined ## See also - [Polyfill of `Array.prototype.at` in `core-js`](https://github.com/zloirock/core-js#relative-indexing-method) +- [es-shims polyfill of `Array.prototype.at`](https://www.npmjs.com/package/array.prototype.at) - [Indexed collections](/en-US/docs/Web/JavaScript/Guide/Indexed_collections) guide - {{jsxref("Array")}} - {{jsxref("Array.prototype.findIndex()")}} diff --git a/files/en-us/web/javascript/reference/global_objects/array/concat/index.md b/files/en-us/web/javascript/reference/global_objects/array/concat/index.md index 62a7bffabe8a9f6..9b3b6c287a9562b 100644 --- a/files/en-us/web/javascript/reference/global_objects/array/concat/index.md +++ b/files/en-us/web/javascript/reference/global_objects/array/concat/index.md @@ -163,6 +163,7 @@ console.log(Array.prototype.concat.call(arrayLike, 3, 4)); // [1, 2, 3, 4] ## See also - [Polyfill of `Array.prototype.concat` in `core-js` with fixes and implementation of modern behavior like `Symbol.isConcatSpreadable` support](https://github.com/zloirock/core-js#ecmascript-array) +- [es-shims polyfill of `Array.prototype.concat`](https://www.npmjs.com/package/array.prototype.concat) - [Indexed collections](/en-US/docs/Web/JavaScript/Guide/Indexed_collections) guide - {{jsxref("Array")}} - {{jsxref("Array.prototype.push()")}} diff --git a/files/en-us/web/javascript/reference/global_objects/array/copywithin/index.md b/files/en-us/web/javascript/reference/global_objects/array/copywithin/index.md index c23720121e3fe3b..4cd92b988cc5433 100644 --- a/files/en-us/web/javascript/reference/global_objects/array/copywithin/index.md +++ b/files/en-us/web/javascript/reference/global_objects/array/copywithin/index.md @@ -121,6 +121,7 @@ console.log(Array.prototype.copyWithin.call(arrayLike, 3, 1)); ## See also - [Polyfill of `Array.prototype.copyWithin` in `core-js`](https://github.com/zloirock/core-js#ecmascript-array) +- [es-shims polyfill of `Array.prototype.copyWithin`](https://www.npmjs.com/package/array.prototype.copywithin) - [Indexed collections](/en-US/docs/Web/JavaScript/Guide/Indexed_collections) guide - {{jsxref("Array")}} - {{jsxref("TypedArray.prototype.copyWithin()")}} diff --git a/files/en-us/web/javascript/reference/global_objects/array/entries/index.md b/files/en-us/web/javascript/reference/global_objects/array/entries/index.md index fda460757dc5879..28d505c1367a300 100644 --- a/files/en-us/web/javascript/reference/global_objects/array/entries/index.md +++ b/files/en-us/web/javascript/reference/global_objects/array/entries/index.md @@ -117,6 +117,7 @@ for (const entry of Array.prototype.entries.call(arrayLike)) { ## See also - [Polyfill of `Array.prototype.entries` in `core-js`](https://github.com/zloirock/core-js#ecmascript-array) +- [es-shims polyfill of `Array.prototype.entries`](https://www.npmjs.com/package/array.prototype.entries) - [Indexed collections](/en-US/docs/Web/JavaScript/Guide/Indexed_collections) guide - {{jsxref("Array")}} - {{jsxref("Array.prototype.keys()")}} diff --git a/files/en-us/web/javascript/reference/global_objects/array/every/index.md b/files/en-us/web/javascript/reference/global_objects/array/every/index.md index cd7270834967a71..0a03c362898c778 100644 --- a/files/en-us/web/javascript/reference/global_objects/array/every/index.md +++ b/files/en-us/web/javascript/reference/global_objects/array/every/index.md @@ -136,6 +136,7 @@ console.log( ## See also - [Polyfill of `Array.prototype.every` in `core-js`](https://github.com/zloirock/core-js#ecmascript-array) +- [es-shims polyfill of `Array.prototype.every`](https://www.npmjs.com/package/array.prototype.every) - [Indexed collections](/en-US/docs/Web/JavaScript/Guide/Indexed_collections) guide - {{jsxref("Array")}} - {{jsxref("Array.prototype.forEach()")}} diff --git a/files/en-us/web/javascript/reference/global_objects/array/filter/index.md b/files/en-us/web/javascript/reference/global_objects/array/filter/index.md index 702a04e15e0872b..ca49cf36b7db637 100644 --- a/files/en-us/web/javascript/reference/global_objects/array/filter/index.md +++ b/files/en-us/web/javascript/reference/global_objects/array/filter/index.md @@ -197,6 +197,7 @@ console.log(Array.prototype.filter.call(arrayLike, (x) => x <= "b")); ## See also - [Polyfill of `Array.prototype.filter` in `core-js`](https://github.com/zloirock/core-js#ecmascript-array) +- [es-shims polyfill of `Array.prototype.filter`](https://www.npmjs.com/package/array.prototype.filter) - [Indexed collections](/en-US/docs/Web/JavaScript/Guide/Indexed_collections) guide - {{jsxref("Array")}} - {{jsxref("Array.prototype.forEach()")}} diff --git a/files/en-us/web/javascript/reference/global_objects/array/find/index.md b/files/en-us/web/javascript/reference/global_objects/array/find/index.md index 61bb93600e6524c..7a92e8afb1ea6af 100644 --- a/files/en-us/web/javascript/reference/global_objects/array/find/index.md +++ b/files/en-us/web/javascript/reference/global_objects/array/find/index.md @@ -199,6 +199,7 @@ console.log(Array.prototype.find.call(arrayLike, (x) => !Number.isInteger(x))); ## See also - [Polyfill of `Array.prototype.find` in `core-js`](https://github.com/zloirock/core-js#ecmascript-array) +- [es-shims polyfill of `Array.prototype.find`](https://www.npmjs.com/package/array.prototype.find) - [Indexed collections](/en-US/docs/Web/JavaScript/Guide/Indexed_collections) guide - {{jsxref("Array")}} - {{jsxref("Array.prototype.findIndex()")}} diff --git a/files/en-us/web/javascript/reference/global_objects/array/findindex/index.md b/files/en-us/web/javascript/reference/global_objects/array/findindex/index.md index 709c763548ea3c0..aeed16ea14fe5c0 100644 --- a/files/en-us/web/javascript/reference/global_objects/array/findindex/index.md +++ b/files/en-us/web/javascript/reference/global_objects/array/findindex/index.md @@ -132,6 +132,7 @@ console.log( ## See also - [Polyfill of `Array.prototype.findIndex` in `core-js`](https://github.com/zloirock/core-js#ecmascript-array) +- [es-shims polyfill of `Array.prototype.findIndex`](https://www.npmjs.com/package/array.prototype.findindex) - [Indexed collections](/en-US/docs/Web/JavaScript/Guide/Indexed_collections) guide - {{jsxref("Array")}} - {{jsxref("Array.prototype.find()")}} diff --git a/files/en-us/web/javascript/reference/global_objects/array/findlast/index.md b/files/en-us/web/javascript/reference/global_objects/array/findlast/index.md index 23e677a504e3720..f4001d89124fc7b 100644 --- a/files/en-us/web/javascript/reference/global_objects/array/findlast/index.md +++ b/files/en-us/web/javascript/reference/global_objects/array/findlast/index.md @@ -211,6 +211,7 @@ console.log( ## See also - [Polyfill of `Array.prototype.findLast` in `core-js`](https://github.com/zloirock/core-js#array-find-from-last) +- [es-shims polyfill of `Array.prototype.findLast`](https://www.npmjs.com/package/array.prototype.findlast) - [Indexed collections](/en-US/docs/Web/JavaScript/Guide/Indexed_collections) guide - {{jsxref("Array")}} - {{jsxref("Array.prototype.find()")}} diff --git a/files/en-us/web/javascript/reference/global_objects/array/findlastindex/index.md b/files/en-us/web/javascript/reference/global_objects/array/findlastindex/index.md index 4cc9ffecf6c2ec5..756817f30e67b6b 100644 --- a/files/en-us/web/javascript/reference/global_objects/array/findlastindex/index.md +++ b/files/en-us/web/javascript/reference/global_objects/array/findlastindex/index.md @@ -134,6 +134,7 @@ console.log( ## See also - [Polyfill of `Array.prototype.findLastIndex` in `core-js`](https://github.com/zloirock/core-js#array-find-from-last) +- [es-shims polyfill of `Array.prototype.findLastIndex`](https://www.npmjs.com/package/array.prototype.findlastindex) - [Indexed collections](/en-US/docs/Web/JavaScript/Guide/Indexed_collections) guide - {{jsxref("Array")}} - {{jsxref("Array.prototype.find()")}} diff --git a/files/en-us/web/javascript/reference/global_objects/array/flat/index.md b/files/en-us/web/javascript/reference/global_objects/array/flat/index.md index 71d60dfbbfa9728..8455809f4c04aa1 100644 --- a/files/en-us/web/javascript/reference/global_objects/array/flat/index.md +++ b/files/en-us/web/javascript/reference/global_objects/array/flat/index.md @@ -121,6 +121,7 @@ console.log(Array.prototype.flat.call(arrayLike)); ## See also - [Polyfill of `Array.prototype.flat` in `core-js`](https://github.com/zloirock/core-js#ecmascript-array) +- [es-shims polyfill of `Array.prototype.flat`](https://www.npmjs.com/package/array.prototype.flat) - [Indexed collections](/en-US/docs/Web/JavaScript/Guide/Indexed_collections) guide - {{jsxref("Array")}} - {{jsxref("Array.prototype.concat()")}} diff --git a/files/en-us/web/javascript/reference/global_objects/array/flatmap/index.md b/files/en-us/web/javascript/reference/global_objects/array/flatmap/index.md index 99405d8fd0b91db..5fa3a6e5660a709 100644 --- a/files/en-us/web/javascript/reference/global_objects/array/flatmap/index.md +++ b/files/en-us/web/javascript/reference/global_objects/array/flatmap/index.md @@ -200,6 +200,7 @@ console.log( ## See also - [Polyfill of `Array.prototype.flatMap` in `core-js`](https://github.com/zloirock/core-js#ecmascript-array) +- [es-shims polyfill of `Array.prototype.flatMap`](https://www.npmjs.com/package/array.prototype.flatmap) - [Indexed collections](/en-US/docs/Web/JavaScript/Guide/Indexed_collections) guide - {{jsxref("Array")}} - {{jsxref("Array.prototype.concat()")}} diff --git a/files/en-us/web/javascript/reference/global_objects/array/foreach/index.md b/files/en-us/web/javascript/reference/global_objects/array/foreach/index.md index fcc31192bdc45f8..7b2f6758b4b8614 100644 --- a/files/en-us/web/javascript/reference/global_objects/array/foreach/index.md +++ b/files/en-us/web/javascript/reference/global_objects/array/foreach/index.md @@ -275,6 +275,7 @@ Array.prototype.forEach.call(arrayLike, (x) => console.log(x)); ## See also - [Polyfill of `Array.prototype.forEach` in `core-js`](https://github.com/zloirock/core-js#ecmascript-array) +- [es-shims polyfill of `Array.prototype.forEach`](https://www.npmjs.com/package/array.prototype.foreach) - [Indexed collections](/en-US/docs/Web/JavaScript/Guide/Indexed_collections) guide - {{jsxref("Array")}} - {{jsxref("Array.prototype.find()")}} diff --git a/files/en-us/web/javascript/reference/global_objects/array/from/index.md b/files/en-us/web/javascript/reference/global_objects/array/from/index.md index 6070f64fda98cd8..a6b07572a74478f 100644 --- a/files/en-us/web/javascript/reference/global_objects/array/from/index.md +++ b/files/en-us/web/javascript/reference/global_objects/array/from/index.md @@ -199,6 +199,7 @@ console.log(Array.from.call({}, { length: 1, 0: "foo" })); // [ 'foo' ] ## See also - [Polyfill of `Array.from` in `core-js`](https://github.com/zloirock/core-js#ecmascript-array) +- [es-shims polyfill of `Array.from`](https://www.npmjs.com/package/array.from) - [Indexed collections](/en-US/docs/Web/JavaScript/Guide/Indexed_collections) guide - {{jsxref("Array")}} - {{jsxref("Array/Array", "Array()")}} diff --git a/files/en-us/web/javascript/reference/global_objects/array/includes/index.md b/files/en-us/web/javascript/reference/global_objects/array/includes/index.md index c6a885358ef1754..9f6f2c05a8b32df 100644 --- a/files/en-us/web/javascript/reference/global_objects/array/includes/index.md +++ b/files/en-us/web/javascript/reference/global_objects/array/includes/index.md @@ -139,6 +139,7 @@ console.log(Array.prototype.includes.call(arrayLike, 1)); ## See also - [Polyfill of `Array.prototype.includes` in `core-js`](https://github.com/zloirock/core-js#ecmascript-array) +- [es-shims polyfill of `Array.prototype.includes`](https://www.npmjs.com/package/array-includes) - [Indexed collections](/en-US/docs/Web/JavaScript/Guide/Indexed_collections) guide - {{jsxref("Array")}} - {{jsxref("Array.prototype.indexOf()")}} diff --git a/files/en-us/web/javascript/reference/global_objects/array/indexof/index.md b/files/en-us/web/javascript/reference/global_objects/array/indexof/index.md index d5773c7bb41b1b2..0fb552245ba880a 100644 --- a/files/en-us/web/javascript/reference/global_objects/array/indexof/index.md +++ b/files/en-us/web/javascript/reference/global_objects/array/indexof/index.md @@ -149,6 +149,7 @@ console.log(Array.prototype.indexOf.call(arrayLike, 5)); ## See also - [Polyfill of `Array.prototype.indexOf` in `core-js`](https://github.com/zloirock/core-js#ecmascript-array) +- [es-shims polyfill of `Array.prototype.indexOf`](https://www.npmjs.com/package/array.prototype.indexof) - [Indexed collections](/en-US/docs/Web/JavaScript/Guide/Indexed_collections) guide - {{jsxref("Array")}} - {{jsxref("Array.prototype.findIndex()")}} diff --git a/files/en-us/web/javascript/reference/global_objects/array/isarray/index.md b/files/en-us/web/javascript/reference/global_objects/array/isarray/index.md index fa1982070710f59..2b50870250e0711 100644 --- a/files/en-us/web/javascript/reference/global_objects/array/isarray/index.md +++ b/files/en-us/web/javascript/reference/global_objects/array/isarray/index.md @@ -108,5 +108,6 @@ arr instanceof Array; // false ## See also - [Polyfill of `Array.isArray` in `core-js`](https://github.com/zloirock/core-js#ecmascript-array) +- [es-shims polyfill of `Array.isArray`](https://www.npmjs.com/package/array.isarray) - [Indexed collections](/en-US/docs/Web/JavaScript/Guide/Indexed_collections) guide - {{jsxref("Array")}} diff --git a/files/en-us/web/javascript/reference/global_objects/array/join/index.md b/files/en-us/web/javascript/reference/global_objects/array/join/index.md index c3074dfba68e6b4..11f3048c5074e54 100644 --- a/files/en-us/web/javascript/reference/global_objects/array/join/index.md +++ b/files/en-us/web/javascript/reference/global_objects/array/join/index.md @@ -128,6 +128,7 @@ console.log(Array.prototype.join.call(arrayLike, ".")); ## See also - [Polyfill of `Array.prototype.join` in `core-js`](https://github.com/zloirock/core-js#ecmascript-array) +- [es-shims polyfill of `Array.prototype.join`](https://www.npmjs.com/package/array.prototype.join) - [Indexed collections](/en-US/docs/Web/JavaScript/Guide/Indexed_collections) guide - {{jsxref("Array")}} - {{jsxref("Array.prototype.toString()")}} diff --git a/files/en-us/web/javascript/reference/global_objects/array/keys/index.md b/files/en-us/web/javascript/reference/global_objects/array/keys/index.md index 3955ebabfbd6c33..c108e068fcfcbf8 100644 --- a/files/en-us/web/javascript/reference/global_objects/array/keys/index.md +++ b/files/en-us/web/javascript/reference/global_objects/array/keys/index.md @@ -85,6 +85,7 @@ for (const entry of Array.prototype.keys.call(arrayLike)) { ## See also - [Polyfill of `Array.prototype.keys` in `core-js`](https://github.com/zloirock/core-js#ecmascript-array) +- [es-shims polyfill of `Array.prototype.keys`](https://www.npmjs.com/package/array.prototype.keys) - [Indexed collections](/en-US/docs/Web/JavaScript/Guide/Indexed_collections) guide - {{jsxref("Array")}} - {{jsxref("Array.prototype.entries()")}} diff --git a/files/en-us/web/javascript/reference/global_objects/array/lastindexof/index.md b/files/en-us/web/javascript/reference/global_objects/array/lastindexof/index.md index b792f0258b48659..778fc3bf20a64d8 100644 --- a/files/en-us/web/javascript/reference/global_objects/array/lastindexof/index.md +++ b/files/en-us/web/javascript/reference/global_objects/array/lastindexof/index.md @@ -137,6 +137,7 @@ console.log(Array.prototype.lastIndexOf.call(arrayLike, 5)); ## See also - [Polyfill of `Array.prototype.lastIndexOf` in `core-js`](https://github.com/zloirock/core-js#ecmascript-array) +- [es-shims polyfill of `Array.prototype.lastIndexOf`](https://www.npmjs.com/package/array.prototype.lastindexof) - [Indexed collections](/en-US/docs/Web/JavaScript/Guide/Indexed_collections) guide - {{jsxref("Array")}} - {{jsxref("Array.prototype.findIndex()")}} diff --git a/files/en-us/web/javascript/reference/global_objects/array/map/index.md b/files/en-us/web/javascript/reference/global_objects/array/map/index.md index b7372f6e8638e82..6c6038f17c34811 100644 --- a/files/en-us/web/javascript/reference/global_objects/array/map/index.md +++ b/files/en-us/web/javascript/reference/global_objects/array/map/index.md @@ -287,6 +287,7 @@ You can also use {{jsxref("Array.from()")}} to transform `elems` to an array, an ## See also - [Polyfill of `Array.prototype.map` in `core-js`](https://github.com/zloirock/core-js#ecmascript-array) +- [es-shims polyfill of `Array.prototype.map`](https://www.npmjs.com/package/array.prototype.map) - [Indexed collections](/en-US/docs/Web/JavaScript/Guide/Indexed_collections) guide - {{jsxref("Array")}} - {{jsxref("Array.prototype.forEach()")}} diff --git a/files/en-us/web/javascript/reference/global_objects/array/of/index.md b/files/en-us/web/javascript/reference/global_objects/array/of/index.md index f49bfaa83adcff9..08fa37c6b2b0899 100644 --- a/files/en-us/web/javascript/reference/global_objects/array/of/index.md +++ b/files/en-us/web/javascript/reference/global_objects/array/of/index.md @@ -96,6 +96,7 @@ console.log(Array.of.call({}, 1)); // [ 1 ] ## See also - [Polyfill of `Array.of` in `core-js`](https://github.com/zloirock/core-js#ecmascript-array) +- [es-shims polyfill of `Array.of`](https://www.npmjs.com/package/array.of) - [Indexed collections](/en-US/docs/Web/JavaScript/Guide/Indexed_collections) guide - {{jsxref("Array")}} - {{jsxref("Array/Array", "Array()")}} diff --git a/files/en-us/web/javascript/reference/global_objects/array/push/index.md b/files/en-us/web/javascript/reference/global_objects/array/push/index.md index 6b670520ca7999d..f8bd327ee737ac8 100644 --- a/files/en-us/web/javascript/reference/global_objects/array/push/index.md +++ b/files/en-us/web/javascript/reference/global_objects/array/push/index.md @@ -152,6 +152,7 @@ were dealing with an actual array. ## See also - [Polyfill of `Array.prototype.push` in `core-js` with fixes of this method](https://github.com/zloirock/core-js#ecmascript-array) +- [es-shims polyfill of `Array.prototype.push`](https://www.npmjs.com/package/array.prototype.push) - [Indexed collections](/en-US/docs/Web/JavaScript/Guide/Indexed_collections) guide - {{jsxref("Array")}} - {{jsxref("Array.prototype.pop()")}} diff --git a/files/en-us/web/javascript/reference/global_objects/array/reduce/index.md b/files/en-us/web/javascript/reference/global_objects/array/reduce/index.md index c3487e005f31f3b..fdb34d5f7e235b7 100644 --- a/files/en-us/web/javascript/reference/global_objects/array/reduce/index.md +++ b/files/en-us/web/javascript/reference/global_objects/array/reduce/index.md @@ -405,6 +405,7 @@ In cases where `reduce()` is the best choice, documentation and semantic variabl ## See also - [Polyfill of `Array.prototype.reduce` in `core-js`](https://github.com/zloirock/core-js#ecmascript-array) +- [es-shims polyfill of `Array.prototype.reduce`](https://www.npmjs.com/package/array.prototype.reduce) - [Indexed collections](/en-US/docs/Web/JavaScript/Guide/Indexed_collections) guide - {{jsxref("Array")}} - {{jsxref("Array.prototype.map()")}} diff --git a/files/en-us/web/javascript/reference/global_objects/array/reduceright/index.md b/files/en-us/web/javascript/reference/global_objects/array/reduceright/index.md index 8736c0266303fd7..8dcb2d25b98604d 100644 --- a/files/en-us/web/javascript/reference/global_objects/array/reduceright/index.md +++ b/files/en-us/web/javascript/reference/global_objects/array/reduceright/index.md @@ -250,6 +250,7 @@ console.log(Array.prototype.reduceRight.call(arrayLike, (x, y) => x - y)); ## See also - [Polyfill of `Array.prototype.reduceRight` in `core-js`](https://github.com/zloirock/core-js#ecmascript-array) +- [es-shims polyfill of `Array.prototype.reduceRight`](https://www.npmjs.com/package/array.prototype.reduceright) - [Indexed collections](/en-US/docs/Web/JavaScript/Guide/Indexed_collections) guide - {{jsxref("Array")}} - {{jsxref("Array.prototype.map()")}} diff --git a/files/en-us/web/javascript/reference/global_objects/array/reverse/index.md b/files/en-us/web/javascript/reference/global_objects/array/reverse/index.md index 7d94b8606ba8c32..3becb2d133598e2 100644 --- a/files/en-us/web/javascript/reference/global_objects/array/reverse/index.md +++ b/files/en-us/web/javascript/reference/global_objects/array/reverse/index.md @@ -125,6 +125,7 @@ console.log(Array.prototype.reverse.call(arrayLike)); ## See also - [Polyfill of `Array.prototype.reverse` in `core-js`](https://github.com/zloirock/core-js#ecmascript-array) +- [es-shims polyfill of `Array.prototype.reverse`](https://www.npmjs.com/package/array.prototype.reverse) - [Indexed collections](/en-US/docs/Web/JavaScript/Guide/Indexed_collections) guide - {{jsxref("Array")}} - {{jsxref("Array.prototype.join()")}} diff --git a/files/en-us/web/javascript/reference/global_objects/array/slice/index.md b/files/en-us/web/javascript/reference/global_objects/array/slice/index.md index 59f2a96b729a89c..1a4bf3fcf9ff189 100644 --- a/files/en-us/web/javascript/reference/global_objects/array/slice/index.md +++ b/files/en-us/web/javascript/reference/global_objects/array/slice/index.md @@ -236,6 +236,7 @@ console.log([1, 2, , 4, 5].slice(1, 4)); // [2, empty, 4] ## See also - [Polyfill of `Array.prototype.slice` in `core-js`](https://github.com/zloirock/core-js#ecmascript-array) +- [es-shims polyfill of `Array.prototype.slice`](https://www.npmjs.com/package/array.prototype.slice) - [Indexed collections](/en-US/docs/Web/JavaScript/Guide/Indexed_collections) guide - {{jsxref("Array")}} - {{jsxref("Array.prototype.pop()")}} diff --git a/files/en-us/web/javascript/reference/global_objects/array/some/index.md b/files/en-us/web/javascript/reference/global_objects/array/some/index.md index 5e5238e39b9f3eb..8232603eddd92d6 100644 --- a/files/en-us/web/javascript/reference/global_objects/array/some/index.md +++ b/files/en-us/web/javascript/reference/global_objects/array/some/index.md @@ -179,6 +179,7 @@ console.log(Array.prototype.some.call(arrayLike, (x) => typeof x === "number")); ## See also - [Polyfill of `Array.prototype.some` in `core-js`](https://github.com/zloirock/core-js#ecmascript-array) +- [es-shims polyfill of `Array.prototype.some`](https://www.npmjs.com/package/array.prototype.some) - [Indexed collections](/en-US/docs/Web/JavaScript/Guide/Indexed_collections) guide - {{jsxref("Array")}} - {{jsxref("Array.prototype.every()")}} diff --git a/files/en-us/web/javascript/reference/global_objects/array/toreversed/index.md b/files/en-us/web/javascript/reference/global_objects/array/toreversed/index.md index e23799eb2dbcbe0..1dba302874d6673 100644 --- a/files/en-us/web/javascript/reference/global_objects/array/toreversed/index.md +++ b/files/en-us/web/javascript/reference/global_objects/array/toreversed/index.md @@ -81,6 +81,7 @@ console.log(Array.prototype.toReversed.call(arrayLike)); ## See also - [Polyfill of `Array.prototype.toReversed` in `core-js`](https://github.com/zloirock/core-js#change-array-by-copy) +- [es-shims polyfill of `Array.prototype.toReversed`](https://www.npmjs.com/package/array.prototype.toreversed) - [Indexed collections](/en-US/docs/Web/JavaScript/Guide/Indexed_collections) guide - {{jsxref("Array.prototype.reverse()")}} - {{jsxref("Array.prototype.toSorted()")}} diff --git a/files/en-us/web/javascript/reference/global_objects/array/tosorted/index.md b/files/en-us/web/javascript/reference/global_objects/array/tosorted/index.md index 5b0f92dbd2cebdb..dd305c85a1caf58 100644 --- a/files/en-us/web/javascript/reference/global_objects/array/tosorted/index.md +++ b/files/en-us/web/javascript/reference/global_objects/array/tosorted/index.md @@ -87,6 +87,7 @@ console.log(Array.prototype.toSorted.call(arrayLike)); ## See also - [Polyfill of `Array.prototype.toSorted` in `core-js`](https://github.com/zloirock/core-js#change-array-by-copy) +- [es-shims polyfill of `Array.prototype.toSorted`](https://www.npmjs.com/package/array.prototype.tosorted) - [Indexed collections](/en-US/docs/Web/JavaScript/Guide/Indexed_collections) guide - {{jsxref("Array.prototype.sort()")}} - {{jsxref("Array.prototype.toReversed()")}} diff --git a/files/en-us/web/javascript/reference/global_objects/array/tospliced/index.md b/files/en-us/web/javascript/reference/global_objects/array/tospliced/index.md index 7b84f1b54aa0740..4152f367bdcf3d1 100644 --- a/files/en-us/web/javascript/reference/global_objects/array/tospliced/index.md +++ b/files/en-us/web/javascript/reference/global_objects/array/tospliced/index.md @@ -115,6 +115,7 @@ console.log(Array.prototype.toSpliced.call(arrayLike, 0, 1, 2, 3)); ## See also - [Polyfill of `Array.prototype.toSpliced` in `core-js`](https://github.com/zloirock/core-js#change-array-by-copy) +- [es-shims polyfill of `Array.prototype.toSpliced`](https://www.npmjs.com/package/array.prototype.tospliced) - {{jsxref("Array.prototype.splice()")}} - {{jsxref("Array.prototype.toReversed()")}} - {{jsxref("Array.prototype.toSorted()")}} diff --git a/files/en-us/web/javascript/reference/global_objects/array/unshift/index.md b/files/en-us/web/javascript/reference/global_objects/array/unshift/index.md index 095ef474c9c8a68..716cc0b8482c97a 100644 --- a/files/en-us/web/javascript/reference/global_objects/array/unshift/index.md +++ b/files/en-us/web/javascript/reference/global_objects/array/unshift/index.md @@ -127,6 +127,7 @@ console.log(plainObj); ## See also - [Polyfill of `Array.prototype.unshift` in `core-js` with fixes of this method](https://github.com/zloirock/core-js#ecmascript-array) +- [es-shims polyfill of `Array.prototype.unshift`](https://www.npmjs.com/package/array.prototype.unshift) - [Indexed collections](/en-US/docs/Web/JavaScript/Guide/Indexed_collections) guide - {{jsxref("Array")}} - {{jsxref("Array.prototype.push()")}} diff --git a/files/en-us/web/javascript/reference/global_objects/array/values/index.md b/files/en-us/web/javascript/reference/global_objects/array/values/index.md index 9f209b7af02ee83..bd5ec61867270da 100644 --- a/files/en-us/web/javascript/reference/global_objects/array/values/index.md +++ b/files/en-us/web/javascript/reference/global_objects/array/values/index.md @@ -186,6 +186,7 @@ for (const entry of Array.prototype.values.call(arrayLike)) { ## See also - [Polyfill of `Array.prototype.values` in `core-js`](https://github.com/zloirock/core-js#ecmascript-array) +- [es-shims polyfill of `Array.prototype.values`](https://www.npmjs.com/package/array.prototype.values) - [Indexed collections](/en-US/docs/Web/JavaScript/Guide/Indexed_collections) guide - {{jsxref("Array")}} - {{jsxref("Array.prototype.entries()")}} diff --git a/files/en-us/web/javascript/reference/global_objects/array/with/index.md b/files/en-us/web/javascript/reference/global_objects/array/with/index.md index ba5950f44dceba0..ae56e9d1ed39155 100644 --- a/files/en-us/web/javascript/reference/global_objects/array/with/index.md +++ b/files/en-us/web/javascript/reference/global_objects/array/with/index.md @@ -98,6 +98,7 @@ console.log(Array.prototype.with.call(arrayLike, 0, 1)); ## See also - [Polyfill of `Array.prototype.with` in `core-js`](https://github.com/zloirock/core-js#change-array-by-copy) +- [es-shims polyfill of `Array.prototype.with`](https://www.npmjs.com/package/array.prototype.with) - [Indexed collections](/en-US/docs/Web/JavaScript/Guide/Indexed_collections) guide - {{jsxref("Array.prototype.toReversed()")}} - {{jsxref("Array.prototype.toSorted()")}} diff --git a/files/en-us/web/javascript/reference/global_objects/arraybuffer/detached/index.md b/files/en-us/web/javascript/reference/global_objects/arraybuffer/detached/index.md index 66b9dcf7d9104b7..e95f2a4bc9700ae 100644 --- a/files/en-us/web/javascript/reference/global_objects/arraybuffer/detached/index.md +++ b/files/en-us/web/javascript/reference/global_objects/arraybuffer/detached/index.md @@ -36,6 +36,7 @@ console.log(newBuffer.detached); // false ## See also - [Polyfill of `ArrayBuffer.prototype.detached` in `core-js`](https://github.com/zloirock/core-js#arraybufferprototypetransfer-and-friends) +- [es-shims polyfill of `ArrayBuffer.prototype.detached`](https://www.npmjs.com/package/arraybuffer.prototype.detached) - {{jsxref("ArrayBuffer")}} - {{jsxref("ArrayBuffer.prototype.transfer()")}} - {{jsxref("ArrayBuffer.prototype.transferToFixedLength()")}} diff --git a/files/en-us/web/javascript/reference/global_objects/arraybuffer/transfer/index.md b/files/en-us/web/javascript/reference/global_objects/arraybuffer/transfer/index.md index 6e8a83078e46fba..ef77677cf827e5b 100644 --- a/files/en-us/web/javascript/reference/global_objects/arraybuffer/transfer/index.md +++ b/files/en-us/web/javascript/reference/global_objects/arraybuffer/transfer/index.md @@ -116,7 +116,8 @@ buffer3.transfer(20); // RangeError: Invalid array buffer length ## See also -- [Polyfill of `ArrayBuffer.prototype.transfer()` in `core-js`](https://github.com/zloirock/core-js#arraybufferprototypetransfer-and-friends) +- [Polyfill of `ArrayBuffer.prototype.transfer` in `core-js`](https://github.com/zloirock/core-js#arraybufferprototypetransfer-and-friends) +- [es-shims polyfill of `ArrayBuffer.prototype.transfer`](https://www.npmjs.com/package/arraybuffer.prototype.transfer) - {{jsxref("ArrayBuffer")}} - {{jsxref("ArrayBuffer.prototype.detached")}} - {{jsxref("ArrayBuffer.prototype.transferToFixedLength()")}} diff --git a/files/en-us/web/javascript/reference/global_objects/arraybuffer/transfertofixedlength/index.md b/files/en-us/web/javascript/reference/global_objects/arraybuffer/transfertofixedlength/index.md index 1a835ca544b4d82..172045875a5f288 100644 --- a/files/en-us/web/javascript/reference/global_objects/arraybuffer/transfertofixedlength/index.md +++ b/files/en-us/web/javascript/reference/global_objects/arraybuffer/transfertofixedlength/index.md @@ -80,7 +80,8 @@ console.log(view2[7]); // 4 ## See also -- [Polyfill of `ArrayBuffer.prototype.transferToFixedLength()` in `core-js`](https://github.com/zloirock/core-js#arraybufferprototypetransfer-and-friends) +- [Polyfill of `ArrayBuffer.prototype.transferToFixedLength` in `core-js`](https://github.com/zloirock/core-js#arraybufferprototypetransfer-and-friends) +- [es-shims polyfill of `ArrayBuffer.prototype.transferToFixedLength`](https://www.npmjs.com/package/arraybuffer.prototype.transfertofixedlength) - {{jsxref("ArrayBuffer")}} - {{jsxref("ArrayBuffer.prototype.detached")}} - {{jsxref("ArrayBuffer.prototype.transfer()")}} diff --git a/files/en-us/web/javascript/reference/global_objects/date/getyear/index.md b/files/en-us/web/javascript/reference/global_objects/date/getyear/index.md index 54192210d98324a..2de7e5ca1e25d18 100644 --- a/files/en-us/web/javascript/reference/global_objects/date/getyear/index.md +++ b/files/en-us/web/javascript/reference/global_objects/date/getyear/index.md @@ -81,6 +81,7 @@ const year = xmas.getYear(); // returns 95 ## See also - [Polyfill of `Date.prototype.getYear` in `core-js`](https://github.com/zloirock/core-js#ecmascript-date) +- [es-shims polyfill of `Date.prototype.getYear`](https://www.npmjs.com/package/date.prototype.getyear) - {{jsxref("Date.prototype.getFullYear()")}} - {{jsxref("Date.prototype.getUTCFullYear()")}} - {{jsxref("Date.prototype.setYear()")}} diff --git a/files/en-us/web/javascript/reference/global_objects/error/error/index.md b/files/en-us/web/javascript/reference/global_objects/error/error/index.md index 3b6576f4d67bed8..65b8d9e1a151437 100644 --- a/files/en-us/web/javascript/reference/global_objects/error/error/index.md +++ b/files/en-us/web/javascript/reference/global_objects/error/error/index.md @@ -98,6 +98,7 @@ console.log("cause" in error3); // false ## See also - [Polyfill of `Error` with `cause` support in `core-js`](https://github.com/zloirock/core-js#ecmascript-error) +- [es-shims polyfill of Error `cause`](https://www.npmjs.com/package/error-cause) - {{jsxref("Statements/throw", "throw")}} - {{jsxref("Statements/try...catch", "try...catch")}} - [Error causes](https://v8.dev/features/error-cause) on v8.dev (2021) diff --git a/files/en-us/web/javascript/reference/global_objects/error/index.md b/files/en-us/web/javascript/reference/global_objects/error/index.md index b5f9fca87c13c1a..f9b0c283db438f2 100644 --- a/files/en-us/web/javascript/reference/global_objects/error/index.md +++ b/files/en-us/web/javascript/reference/global_objects/error/index.md @@ -225,6 +225,7 @@ try { ## See also - [Polyfill of `Error` with `cause` support in `core-js`](https://github.com/zloirock/core-js#ecmascript-error) +- [es-shims polyfill of Error `cause`](https://www.npmjs.com/package/error-cause) - {{jsxref("Statements/throw", "throw")}} - {{jsxref("Statements/try...catch", "try...catch")}} - [Stack trace API](https://v8.dev/docs/stack-trace-api) in the V8 docs diff --git a/files/en-us/web/javascript/reference/global_objects/error/iserror/index.md b/files/en-us/web/javascript/reference/global_objects/error/iserror/index.md index 34d9f4efc749316..088956280876aa3 100644 --- a/files/en-us/web/javascript/reference/global_objects/error/iserror/index.md +++ b/files/en-us/web/javascript/reference/global_objects/error/iserror/index.md @@ -108,4 +108,5 @@ try { ## See also - [Polyfill of `Error.isError` in `core-js`](https://github.com/zloirock/core-js#erroriserror) +- [es-shims polyfill of `Error.isError`](https://www.npmjs.com/package/error.iserror) - {{jsxref("Error")}} diff --git a/files/en-us/web/javascript/reference/global_objects/function/name/index.md b/files/en-us/web/javascript/reference/global_objects/function/name/index.md index 4c7d05c2109bbb0..cc43f1ae70eddf0 100644 --- a/files/en-us/web/javascript/reference/global_objects/function/name/index.md +++ b/files/en-us/web/javascript/reference/global_objects/function/name/index.md @@ -324,4 +324,5 @@ In the uncompressed version, the program runs into the truthy branch and logs "' ## See also - [Polyfill for `Function: name` in `core-js`](https://github.com/zloirock/core-js#ecmascript-function) +- [es-shims polyfill of `Function.prototype.name`](https://www.npmjs.com/package/function.prototype.name) - {{jsxref("Function")}} diff --git a/files/en-us/web/javascript/reference/global_objects/globalthis/index.md b/files/en-us/web/javascript/reference/global_objects/globalthis/index.md index 2dd30c863a5334b..36b42ea2e2e1701 100644 --- a/files/en-us/web/javascript/reference/global_objects/globalthis/index.md +++ b/files/en-us/web/javascript/reference/global_objects/globalthis/index.md @@ -120,4 +120,5 @@ if (typeof globalThis.Intl === "undefined") { ## See also - [Polyfill of `globalThis` in `core-js`](https://github.com/zloirock/core-js#ecmascript-globalthis) +- [es-shims polyfill of `globalThis`](https://www.npmjs.com/package/globalthis) - {{jsxref("Operators/this", "this")}} diff --git a/files/en-us/web/javascript/reference/global_objects/iterator/drop/index.md b/files/en-us/web/javascript/reference/global_objects/iterator/drop/index.md index d8f92058dc7b1a4..aa6c7322a27419c 100644 --- a/files/en-us/web/javascript/reference/global_objects/iterator/drop/index.md +++ b/files/en-us/web/javascript/reference/global_objects/iterator/drop/index.md @@ -134,5 +134,6 @@ new Set([1, 2, 3]).values().drop(4).next(); // { value: undefined, done: true } ## See also - [Polyfill of `Iterator.prototype.drop` in `core-js`](https://github.com/zloirock/core-js#iterator-helpers) +- [es-shims polyfill of `Iterator.prototype.drop`](https://www.npmjs.com/package/es-iterator-helpers) - {{jsxref("Iterator")}} - {{jsxref("Iterator.prototype.take()")}} diff --git a/files/en-us/web/javascript/reference/global_objects/iterator/every/index.md b/files/en-us/web/javascript/reference/global_objects/iterator/every/index.md index 179b19eb645c8a3..2111dcd81dd5624 100644 --- a/files/en-us/web/javascript/reference/global_objects/iterator/every/index.md +++ b/files/en-us/web/javascript/reference/global_objects/iterator/every/index.md @@ -75,6 +75,7 @@ console.log(seq.next()); // { value: undefined, done: true } ## See also - [Polyfill of `Iterator.prototype.every` in `core-js`](https://github.com/zloirock/core-js#iterator-helpers) +- [es-shims polyfill of `Iterator.prototype.every`](https://www.npmjs.com/package/es-iterator-helpers) - {{jsxref("Iterator")}} - {{jsxref("Iterator.prototype.find()")}} - {{jsxref("Iterator.prototype.some()")}} diff --git a/files/en-us/web/javascript/reference/global_objects/iterator/filter/index.md b/files/en-us/web/javascript/reference/global_objects/iterator/filter/index.md index 83bdc2d798eea8d..6d3ba39624c89cd 100644 --- a/files/en-us/web/javascript/reference/global_objects/iterator/filter/index.md +++ b/files/en-us/web/javascript/reference/global_objects/iterator/filter/index.md @@ -97,6 +97,7 @@ for (const n of fibonacci()) { ## See also - [Polyfill of `Iterator.prototype.filter` in `core-js`](https://github.com/zloirock/core-js#iterator-helpers) +- [es-shims polyfill of `Iterator.prototype.filter`](https://www.npmjs.com/package/es-iterator-helpers) - {{jsxref("Iterator")}} - {{jsxref("Iterator.prototype.forEach()")}} - {{jsxref("Iterator.prototype.every()")}} diff --git a/files/en-us/web/javascript/reference/global_objects/iterator/find/index.md b/files/en-us/web/javascript/reference/global_objects/iterator/find/index.md index 6c2f7d101adb86b..379c979809f2c79 100644 --- a/files/en-us/web/javascript/reference/global_objects/iterator/find/index.md +++ b/files/en-us/web/javascript/reference/global_objects/iterator/find/index.md @@ -75,6 +75,7 @@ console.log(seq.next()); // { value: undefined, done: true } ## See also - [Polyfill of `Iterator.prototype.find` in `core-js`](https://github.com/zloirock/core-js#iterator-helpers) +- [es-shims polyfill of `Iterator.prototype.find`](https://www.npmjs.com/package/es-iterator-helpers) - {{jsxref("Iterator")}} - {{jsxref("Iterator.prototype.every()")}} - {{jsxref("Iterator.prototype.some()")}} diff --git a/files/en-us/web/javascript/reference/global_objects/iterator/flatmap/index.md b/files/en-us/web/javascript/reference/global_objects/iterator/flatmap/index.md index 953a367b25e84f4..e14064ada6494dd 100644 --- a/files/en-us/web/javascript/reference/global_objects/iterator/flatmap/index.md +++ b/files/en-us/web/javascript/reference/global_objects/iterator/flatmap/index.md @@ -144,3 +144,4 @@ Or, if the behavior of iterating by code points is intended, you can use {{jsxre ## See also - [Polyfill of `Iterator.prototype.flatMap` in `core-js`](https://github.com/zloirock/core-js#iterator-helpers) +- [es-shims polyfill of `Iterator.prototype.flatMap`](https://www.npmjs.com/package/es-iterator-helpers) diff --git a/files/en-us/web/javascript/reference/global_objects/iterator/foreach/index.md b/files/en-us/web/javascript/reference/global_objects/iterator/foreach/index.md index e0d741da40f26c8..f12f75f2ca18b06 100644 --- a/files/en-us/web/javascript/reference/global_objects/iterator/foreach/index.md +++ b/files/en-us/web/javascript/reference/global_objects/iterator/foreach/index.md @@ -64,6 +64,7 @@ for (const v of new Set([1, 2, 3]).values()) { ## See also - [Polyfill of `Iterator.prototype.forEach` in `core-js`](https://github.com/zloirock/core-js#iterator-helpers) +- [es-shims polyfill of `Iterator.prototype.forEach`](https://www.npmjs.com/package/es-iterator-helpers) - {{jsxref("Iterator")}} - {{jsxref("Iterator.prototype.find()")}} - {{jsxref("Iterator.prototype.map()")}} diff --git a/files/en-us/web/javascript/reference/global_objects/iterator/from/index.md b/files/en-us/web/javascript/reference/global_objects/iterator/from/index.md index b22b186da412891..2e86ca676713603 100644 --- a/files/en-us/web/javascript/reference/global_objects/iterator/from/index.md +++ b/files/en-us/web/javascript/reference/global_objects/iterator/from/index.md @@ -120,5 +120,6 @@ console.log(obj2.next()); // { value: 1, done: false } ## See also - [Polyfill of `Iterator.from` in `core-js`](https://github.com/zloirock/core-js#iterator-helpers) +- [es-shims polyfill of `Iterator.from`](https://www.npmjs.com/package/es-iterator-helpers) - {{jsxref("Iterator")}} - {{jsxref("Array.from()")}} diff --git a/files/en-us/web/javascript/reference/global_objects/iterator/index.md b/files/en-us/web/javascript/reference/global_objects/iterator/index.md index 8540994b7deac9d..e13af5efb6b5c70 100644 --- a/files/en-us/web/javascript/reference/global_objects/iterator/index.md +++ b/files/en-us/web/javascript/reference/global_objects/iterator/index.md @@ -204,5 +204,6 @@ for (const value of arrIterator) { ## See also - [Polyfill of `Iterator` in `core-js`](https://github.com/zloirock/core-js#iterator-helpers) +- [es-shims polyfill of `Iterator` and associated helpers](https://www.npmjs.com/package/es-iterator-helpers) - {{jsxref("Statements/function*", "function*")}} - [Iteration protocols](/en-US/docs/Web/JavaScript/Reference/Iteration_protocols) diff --git a/files/en-us/web/javascript/reference/global_objects/iterator/iterator/index.md b/files/en-us/web/javascript/reference/global_objects/iterator/iterator/index.md index aabf6b84c28073c..c2a3cfeaddf6fdc 100644 --- a/files/en-us/web/javascript/reference/global_objects/iterator/iterator/index.md +++ b/files/en-us/web/javascript/reference/global_objects/iterator/iterator/index.md @@ -141,5 +141,6 @@ The subclassing pattern is useful if you want to create many custom iterators. I ## See also - [Polyfill of `Iterator` in `core-js`](https://github.com/zloirock/core-js#iterator-helpers) +- [es-shims polyfill of `Iterator` and associated helpers](https://www.npmjs.com/package/es-iterator-helpers) - {{jsxref("Iterator")}} - {{jsxref("Iterator.from()")}} diff --git a/files/en-us/web/javascript/reference/global_objects/iterator/map/index.md b/files/en-us/web/javascript/reference/global_objects/iterator/map/index.md index 1ca53c32e30a600..ca2a64eb28cc95c 100644 --- a/files/en-us/web/javascript/reference/global_objects/iterator/map/index.md +++ b/files/en-us/web/javascript/reference/global_objects/iterator/map/index.md @@ -98,3 +98,7 @@ for (const n of fibonacci()) { ## See also - [Polyfill of `Iterator.prototype.map` in `core-js`](https://github.com/zloirock/core-js#iterator-helpers) +- [es-shims polyfill of `Iterator.prototype.map`](https://www.npmjs.com/package/es-iterator-helpers) +- {{jsxref("Iterator")}} +- {{jsxref("Iterator.prototype.flatMap()")}} +- {{jsxref("Array.prototype.reduce()")}} diff --git a/files/en-us/web/javascript/reference/global_objects/iterator/reduce/index.md b/files/en-us/web/javascript/reference/global_objects/iterator/reduce/index.md index 5cb0c77e9c9f320..426a73610499290 100644 --- a/files/en-us/web/javascript/reference/global_objects/iterator/reduce/index.md +++ b/files/en-us/web/javascript/reference/global_objects/iterator/reduce/index.md @@ -76,6 +76,7 @@ console.log( ## See also - [Polyfill of `Iterator.prototype.reduce` in `core-js`](https://github.com/zloirock/core-js#iterator-helpers) +- [es-shims polyfill of `Iterator.prototype.reduce`](https://www.npmjs.com/package/es-iterator-helpers) - {{jsxref("Iterator")}} - {{jsxref("Iterator.prototype.map()")}} - {{jsxref("Iterator.prototype.flatMap()")}} diff --git a/files/en-us/web/javascript/reference/global_objects/iterator/some/index.md b/files/en-us/web/javascript/reference/global_objects/iterator/some/index.md index ab31e6a1cd39475..6e697a2d843ff99 100644 --- a/files/en-us/web/javascript/reference/global_objects/iterator/some/index.md +++ b/files/en-us/web/javascript/reference/global_objects/iterator/some/index.md @@ -75,6 +75,7 @@ console.log(seq.next()); // { value: undefined, done: true } ## See also - [Polyfill of `Iterator.prototype.some` in `core-js`](https://github.com/zloirock/core-js#iterator-helpers) +- [es-shims polyfill of `Iterator.prototype.some`](https://www.npmjs.com/package/es-iterator-helpers) - {{jsxref("Iterator")}} - {{jsxref("Iterator.prototype.every()")}} - {{jsxref("Iterator.prototype.find()")}} diff --git a/files/en-us/web/javascript/reference/global_objects/iterator/take/index.md b/files/en-us/web/javascript/reference/global_objects/iterator/take/index.md index 20fda50574b65b2..a3ef7eee16c53af 100644 --- a/files/en-us/web/javascript/reference/global_objects/iterator/take/index.md +++ b/files/en-us/web/javascript/reference/global_objects/iterator/take/index.md @@ -130,5 +130,6 @@ for (const n of new Set([1, 2, 3]).values().take(Infinity)) { ## See also - [Polyfill of `Iterator.prototype.take` in `core-js`](https://github.com/zloirock/core-js#iterator-helpers) +- [es-shims polyfill of `Iterator.prototype.take`](https://www.npmjs.com/package/es-iterator-helpers) - {{jsxref("Iterator")}} - {{jsxref("Iterator.prototype.drop()")}} diff --git a/files/en-us/web/javascript/reference/global_objects/iterator/toarray/index.md b/files/en-us/web/javascript/reference/global_objects/iterator/toarray/index.md index 11dd9769f3ef2b1..8ce91b4a2f75897 100644 --- a/files/en-us/web/javascript/reference/global_objects/iterator/toarray/index.md +++ b/files/en-us/web/javascript/reference/global_objects/iterator/toarray/index.md @@ -60,5 +60,6 @@ Note that it's a good idea to call `toArray()` as a last step of your processing ## See also - [Polyfill of `Iterator.prototype.toArray` in `core-js`](https://github.com/zloirock/core-js#iterator-helpers) +- [es-shims polyfill of `Iterator.prototype.toArray`](https://www.npmjs.com/package/es-iterator-helpers) - {{jsxref("Iterator")}} - {{jsxref("Array.from()")}} diff --git a/files/en-us/web/javascript/reference/global_objects/map/groupby/index.md b/files/en-us/web/javascript/reference/global_objects/map/groupby/index.md index aff6714c4809bec..02e2609831fdf2a 100644 --- a/files/en-us/web/javascript/reference/global_objects/map/groupby/index.md +++ b/files/en-us/web/javascript/reference/global_objects/map/groupby/index.md @@ -122,6 +122,7 @@ console.log(result.get(restock2)); // undefined ## See also - [Polyfill of `Map.groupBy` in `core-js`](https://github.com/zloirock/core-js#array-grouping) +- [es-shims polyfill of `Map.groupBy`](https://www.npmjs.com/package/map.groupby) - [Indexed collections](/en-US/docs/Web/JavaScript/Guide/Indexed_collections) guide - {{jsxref("Array.prototype.reduce()")}} - {{jsxref("Map/Map", "Map()")}} diff --git a/files/en-us/web/javascript/reference/global_objects/map/index.md b/files/en-us/web/javascript/reference/global_objects/map/index.md index 9eb0b7898512f27..8b818030bcf8624 100644 --- a/files/en-us/web/javascript/reference/global_objects/map/index.md +++ b/files/en-us/web/javascript/reference/global_objects/map/index.md @@ -555,6 +555,7 @@ console.log(merged.get(3)); // three ## See also - [Polyfill for `Map` in `core-js`](https://github.com/zloirock/core-js#map) +- [es-shims polyfill of `Map`](https://www.npmjs.com/package/es-map) - {{jsxref("Set")}} - {{jsxref("WeakMap")}} - {{jsxref("WeakSet")}} diff --git a/files/en-us/web/javascript/reference/global_objects/map/map/index.md b/files/en-us/web/javascript/reference/global_objects/map/map/index.md index f104babe6d1cbdd..a05b7f45da41f4c 100644 --- a/files/en-us/web/javascript/reference/global_objects/map/map/index.md +++ b/files/en-us/web/javascript/reference/global_objects/map/map/index.md @@ -50,6 +50,7 @@ const myMap = new Map([ ## See also - [Polyfill for `Map` in `core-js`](https://github.com/zloirock/core-js#map) +- [es-shims polyfill of `Map`](https://www.npmjs.com/package/es-map) - {{jsxref("Set")}} - {{jsxref("WeakMap")}} - {{jsxref("WeakSet")}} diff --git a/files/en-us/web/javascript/reference/global_objects/math/acosh/index.md b/files/en-us/web/javascript/reference/global_objects/math/acosh/index.md index 9ce4892b323d2b8..35265ff30961457 100644 --- a/files/en-us/web/javascript/reference/global_objects/math/acosh/index.md +++ b/files/en-us/web/javascript/reference/global_objects/math/acosh/index.md @@ -72,6 +72,7 @@ Math.acosh(Infinity); // Infinity ## See also - [Polyfill of `Math.acosh` in `core-js`](https://github.com/zloirock/core-js#ecmascript-math) +- [es-shims polyfill of `Math.acosh`](https://www.npmjs.com/package/math.acosh) - {{jsxref("Math.asinh()")}} - {{jsxref("Math.atanh()")}} - {{jsxref("Math.cosh()")}} diff --git a/files/en-us/web/javascript/reference/global_objects/math/asinh/index.md b/files/en-us/web/javascript/reference/global_objects/math/asinh/index.md index 4b34f710563aa47..abcb3af072b9735 100644 --- a/files/en-us/web/javascript/reference/global_objects/math/asinh/index.md +++ b/files/en-us/web/javascript/reference/global_objects/math/asinh/index.md @@ -74,6 +74,7 @@ Math.asinh(Infinity); // Infinity ## See also - [Polyfill of `Math.asinh` in `core-js`](https://github.com/zloirock/core-js#ecmascript-math) +- [es-shims polyfill of `Math.asinh`](https://www.npmjs.com/package/math.asinh) - {{jsxref("Math.acosh()")}} - {{jsxref("Math.atanh()")}} - {{jsxref("Math.cosh()")}} diff --git a/files/en-us/web/javascript/reference/global_objects/math/atanh/index.md b/files/en-us/web/javascript/reference/global_objects/math/atanh/index.md index 5e270e8fde29517..8c10f3f4f3a9e2d 100644 --- a/files/en-us/web/javascript/reference/global_objects/math/atanh/index.md +++ b/files/en-us/web/javascript/reference/global_objects/math/atanh/index.md @@ -75,6 +75,7 @@ Math.atanh(2); // NaN ## See also - [Polyfill of `Math.atanh` in `core-js`](https://github.com/zloirock/core-js#ecmascript-math) +- [es-shims polyfill of `Math.atanh`](https://www.npmjs.com/package/math.atanh) - {{jsxref("Math.acosh()")}} - {{jsxref("Math.asinh()")}} - {{jsxref("Math.cosh()")}} diff --git a/files/en-us/web/javascript/reference/global_objects/math/cbrt/index.md b/files/en-us/web/javascript/reference/global_objects/math/cbrt/index.md index 25dd76fd379a93c..771b0f783bee9f4 100644 --- a/files/en-us/web/javascript/reference/global_objects/math/cbrt/index.md +++ b/files/en-us/web/javascript/reference/global_objects/math/cbrt/index.md @@ -75,5 +75,6 @@ Math.cbrt(Infinity); // Infinity ## See also - [Polyfill of `Math.cbrt` in `core-js`](https://github.com/zloirock/core-js#ecmascript-math) +- [es-shims polyfill of `Math.cbrt`](https://www.npmjs.com/package/math.cbrt) - {{jsxref("Math.pow()")}} - {{jsxref("Math.sqrt()")}} diff --git a/files/en-us/web/javascript/reference/global_objects/math/clz32/index.md b/files/en-us/web/javascript/reference/global_objects/math/clz32/index.md index 7ebe922dcf68ee9..240f78d5661fd0a 100644 --- a/files/en-us/web/javascript/reference/global_objects/math/clz32/index.md +++ b/files/en-us/web/javascript/reference/global_objects/math/clz32/index.md @@ -167,5 +167,6 @@ const { ctrz, ctron } = countTrailsMethods; ## See also - [Polyfill of `Math.clz32` in `core-js`](https://github.com/zloirock/core-js#ecmascript-math) +- [es-shims polyfill of `Math.clz32`](https://www.npmjs.com/package/math.clz32) - {{jsxref("Math")}} - {{jsxref("Math.imul")}} diff --git a/files/en-us/web/javascript/reference/global_objects/math/cosh/index.md b/files/en-us/web/javascript/reference/global_objects/math/cosh/index.md index ae1f90208f76f2e..f24a120003eb851 100644 --- a/files/en-us/web/javascript/reference/global_objects/math/cosh/index.md +++ b/files/en-us/web/javascript/reference/global_objects/math/cosh/index.md @@ -74,6 +74,7 @@ Math.cosh(Infinity); // Infinity ## See also - [Polyfill of `Math.cosh` in `core-js`](https://github.com/zloirock/core-js#ecmascript-math) +- [es-shims polyfill of `Math.cosh`](https://www.npmjs.com/package/math.cosh) - {{jsxref("Math.acosh()")}} - {{jsxref("Math.asinh()")}} - {{jsxref("Math.atanh()")}} diff --git a/files/en-us/web/javascript/reference/global_objects/math/f16round/index.md b/files/en-us/web/javascript/reference/global_objects/math/f16round/index.md index cfe9cf84083291f..264fd8f20b92276 100644 --- a/files/en-us/web/javascript/reference/global_objects/math/f16round/index.md +++ b/files/en-us/web/javascript/reference/global_objects/math/f16round/index.md @@ -81,5 +81,6 @@ Math.f16round(100000); // Infinity ## See also - [Polyfill of `Math.f16round` in `core-js`](https://github.com/zloirock/core-js#float16-methods) +- [es-shims polyfill of `Math.f16round`](https://www.npmjs.com/package/math.f16round) - {{jsxref("Math.fround()")}} - {{jsxref("Math.round()")}} diff --git a/files/en-us/web/javascript/reference/global_objects/math/fround/index.md b/files/en-us/web/javascript/reference/global_objects/math/fround/index.md index 7d3a25949d126e2..c096f2c1a288c86 100644 --- a/files/en-us/web/javascript/reference/global_objects/math/fround/index.md +++ b/files/en-us/web/javascript/reference/global_objects/math/fround/index.md @@ -84,4 +84,5 @@ Math.fround(2 ** 150); // Infinity ## See also - [Polyfill of `Math.fround` in `core-js`](https://github.com/zloirock/core-js#ecmascript-math) +- [es-shims polyfill of `Math.fround`](https://www.npmjs.com/package/math.fround) - {{jsxref("Math.round()")}} diff --git a/files/en-us/web/javascript/reference/global_objects/math/imul/index.md b/files/en-us/web/javascript/reference/global_objects/math/imul/index.md index 15aad2c2c3b274d..5ea5fdf1a1db8a1 100644 --- a/files/en-us/web/javascript/reference/global_objects/math/imul/index.md +++ b/files/en-us/web/javascript/reference/global_objects/math/imul/index.md @@ -73,4 +73,5 @@ Math.imul(0xfffffffe, 5); // -10 ## See also - [Polyfill of `Math.imul` in `core-js`](https://github.com/zloirock/core-js#ecmascript-math) +- [es-shims polyfill of `Math.imul`](https://www.npmjs.com/package/math.imul) - [Emscripten](https://en.wikipedia.org/wiki/Emscripten) on Wikipedia diff --git a/files/en-us/web/javascript/reference/global_objects/math/log10/index.md b/files/en-us/web/javascript/reference/global_objects/math/log10/index.md index f383cca247319f7..0392990bb2e98a6 100644 --- a/files/en-us/web/javascript/reference/global_objects/math/log10/index.md +++ b/files/en-us/web/javascript/reference/global_objects/math/log10/index.md @@ -77,6 +77,7 @@ Math.log10(Infinity); // Infinity ## See also - [Polyfill of `Math.log10` in `core-js`](https://github.com/zloirock/core-js#ecmascript-math) +- [es-shims polyfill of `Math.log10`](https://www.npmjs.com/package/math.log10) - {{jsxref("Math.exp()")}} - {{jsxref("Math.log()")}} - {{jsxref("Math.log1p()")}} diff --git a/files/en-us/web/javascript/reference/global_objects/math/log1p/index.md b/files/en-us/web/javascript/reference/global_objects/math/log1p/index.md index a06504eb734338d..f869a809b398855 100644 --- a/files/en-us/web/javascript/reference/global_objects/math/log1p/index.md +++ b/files/en-us/web/javascript/reference/global_objects/math/log1p/index.md @@ -82,6 +82,7 @@ Math.log1p(Infinity); // Infinity ## See also - [Polyfill of `Math.log1p` in `core-js`](https://github.com/zloirock/core-js#ecmascript-math) +- [es-shims polyfill of `Math.log1p`](https://www.npmjs.com/package/math.log1p) - {{jsxref("Math.exp()")}} - {{jsxref("Math.log()")}} - {{jsxref("Math.expm1()")}} diff --git a/files/en-us/web/javascript/reference/global_objects/math/sign/index.md b/files/en-us/web/javascript/reference/global_objects/math/sign/index.md index 6d7caaef87f8c44..6692c2408eb2a55 100644 --- a/files/en-us/web/javascript/reference/global_objects/math/sign/index.md +++ b/files/en-us/web/javascript/reference/global_objects/math/sign/index.md @@ -76,6 +76,7 @@ Math.sign(); // NaN ## See also - [Polyfill of `Math.sign` in `core-js`](https://github.com/zloirock/core-js#ecmascript-math) +- [es-shims polyfill of `Math.sign`](https://www.npmjs.com/package/math.sign) - {{jsxref("Math.abs()")}} - {{jsxref("Math.ceil()")}} - {{jsxref("Math.floor()")}} diff --git a/files/en-us/web/javascript/reference/global_objects/math/sumprecise/index.md b/files/en-us/web/javascript/reference/global_objects/math/sumprecise/index.md index b861003256e09d7..5d10bb3de4a274d 100644 --- a/files/en-us/web/javascript/reference/global_objects/math/sumprecise/index.md +++ b/files/en-us/web/javascript/reference/global_objects/math/sumprecise/index.md @@ -84,4 +84,5 @@ console.log(Math.sumPrecise([1e20, 0.1, -1e20])); // 0.1 ## See also - [Polyfill of `Math.sumPrecise` in `core-js`](https://github.com/zloirock/core-js#mathsumprecise) +- [es-shims polyfill of `Math.sumPrecise`](https://www.npmjs.com/package/math.sumprecise) - {{jsxref("Array.prototype.reduce()")}} diff --git a/files/en-us/web/javascript/reference/global_objects/number/epsilon/index.md b/files/en-us/web/javascript/reference/global_objects/number/epsilon/index.md index 5113fa61004346d..ebc5b3b6e50008b 100644 --- a/files/en-us/web/javascript/reference/global_objects/number/epsilon/index.md +++ b/files/en-us/web/javascript/reference/global_objects/number/epsilon/index.md @@ -102,4 +102,5 @@ In addition to magnitude, it is important to consider the _accuracy_ of your inp ## See also - [Polyfill of `Number.EPSILON` in `core-js`](https://github.com/zloirock/core-js#ecmascript-number) +- [es-shims polyfill of `Number.EPSILON`](https://www.npmjs.com/package/es-constants) - {{jsxref("Number")}} diff --git a/files/en-us/web/javascript/reference/global_objects/number/isfinite/index.md b/files/en-us/web/javascript/reference/global_objects/number/isfinite/index.md index 236c407ec8c2514..2ba7cb32602e4ae 100644 --- a/files/en-us/web/javascript/reference/global_objects/number/isfinite/index.md +++ b/files/en-us/web/javascript/reference/global_objects/number/isfinite/index.md @@ -72,5 +72,6 @@ Number.isFinite(null); // false ## See also - [Polyfill of `Number.isFinite` in `core-js`](https://github.com/zloirock/core-js#ecmascript-number) +- [es-shims polyfill of `Number.isFinite`](https://www.npmjs.com/package/number.isfinite) - {{jsxref("Number")}} - {{jsxref("isFinite()")}} diff --git a/files/en-us/web/javascript/reference/global_objects/number/isinteger/index.md b/files/en-us/web/javascript/reference/global_objects/number/isinteger/index.md index b4143a39d832fa6..0935de271c2de00 100644 --- a/files/en-us/web/javascript/reference/global_objects/number/isinteger/index.md +++ b/files/en-us/web/javascript/reference/global_objects/number/isinteger/index.md @@ -87,4 +87,5 @@ Number.isInteger(4500000000000000.1); // true, because of loss of precision ## See also - [Polyfill of `Number.isInteger` in `core-js`](https://github.com/zloirock/core-js#ecmascript-number) +- [es-shims polyfill of `Number.isInteger`](https://www.npmjs.com/package/number.isinteger) - {{jsxref("Number")}} diff --git a/files/en-us/web/javascript/reference/global_objects/number/isnan/index.md b/files/en-us/web/javascript/reference/global_objects/number/isnan/index.md index c505a5904fb984d..fd21d06e4315202 100644 --- a/files/en-us/web/javascript/reference/global_objects/number/isnan/index.md +++ b/files/en-us/web/javascript/reference/global_objects/number/isnan/index.md @@ -105,5 +105,6 @@ isNaN(" "); // false, this is coerced to 0 ## See also - [Polyfill of `Number.isNaN` in `core-js`](https://github.com/zloirock/core-js#ecmascript-number) +- [es-shims polyfill of `Number.isNaN`](https://www.npmjs.com/package/number.isnan) - {{jsxref("Number")}} - {{jsxref("isNaN()")}} diff --git a/files/en-us/web/javascript/reference/global_objects/number/issafeinteger/index.md b/files/en-us/web/javascript/reference/global_objects/number/issafeinteger/index.md index f667302730c13ea..b470c4f94fbd182 100644 --- a/files/en-us/web/javascript/reference/global_objects/number/issafeinteger/index.md +++ b/files/en-us/web/javascript/reference/global_objects/number/issafeinteger/index.md @@ -80,6 +80,7 @@ Number.isSafeInteger(3.0); // true ## See also - [Polyfill of `Number.isSafeInteger` in `core-js`](https://github.com/zloirock/core-js#ecmascript-number) +- [es-shims polyfill of `Number.isSafeInteger`](https://www.npmjs.com/package/number.issafeinteger) - {{jsxref("Number")}} - {{jsxref("Number.MIN_SAFE_INTEGER")}} - {{jsxref("Number.MAX_SAFE_INTEGER")}} diff --git a/files/en-us/web/javascript/reference/global_objects/number/max_safe_integer/index.md b/files/en-us/web/javascript/reference/global_objects/number/max_safe_integer/index.md index 22871613bed2adc..93331ccb614a1a7 100644 --- a/files/en-us/web/javascript/reference/global_objects/number/max_safe_integer/index.md +++ b/files/en-us/web/javascript/reference/global_objects/number/max_safe_integer/index.md @@ -66,6 +66,7 @@ Number.MAX_SAFE_INTEGER * Number.EPSILON; // 1.9999999999999998 ## See also - [Polyfill of `Number.MAX_SAFE_INTEGER` in `core-js`](https://github.com/zloirock/core-js#ecmascript-number) +- [es-shims polyfill of `Number.MAX_SAFE_INTEGER`](https://www.npmjs.com/package/es-constants) - {{jsxref("Number.MIN_SAFE_INTEGER")}} - {{jsxref("Number.isSafeInteger()")}} - {{jsxref("BigInt")}} diff --git a/files/en-us/web/javascript/reference/global_objects/number/min_safe_integer/index.md b/files/en-us/web/javascript/reference/global_objects/number/min_safe_integer/index.md index 820a85d49ade01d..14707a660febba7 100644 --- a/files/en-us/web/javascript/reference/global_objects/number/min_safe_integer/index.md +++ b/files/en-us/web/javascript/reference/global_objects/number/min_safe_integer/index.md @@ -59,6 +59,7 @@ Number.MIN_SAFE_INTEGER; // -9007199254740991 ## See also - [Polyfill of `Number.MIN_SAFE_INTEGER` in `core-js`](https://github.com/zloirock/core-js#ecmascript-number) +- [es-shims polyfill of `Number.MIN_SAFE_INTEGER`](https://www.npmjs.com/package/es-constants) - {{jsxref("Number.MAX_SAFE_INTEGER")}} - {{jsxref("Number.isSafeInteger()")}} - {{jsxref("BigInt")}} diff --git a/files/en-us/web/javascript/reference/global_objects/number/parsefloat/index.md b/files/en-us/web/javascript/reference/global_objects/number/parsefloat/index.md index e71ca662bcd5ae8..180f74f25c3d18c 100644 --- a/files/en-us/web/javascript/reference/global_objects/number/parsefloat/index.md +++ b/files/en-us/web/javascript/reference/global_objects/number/parsefloat/index.md @@ -68,5 +68,6 @@ See {{jsxref("parseFloat()")}} for more detail and examples. ## See also - [Polyfill of `Number.parseFloat` in `core-js`](https://github.com/zloirock/core-js#ecmascript-number) +- [es-shims polyfill of `Number.parseFloat`](https://www.npmjs.com/package/number.parsefloat) - {{jsxref("Number")}} - {{jsxref("parseFloat()")}} diff --git a/files/en-us/web/javascript/reference/global_objects/number/parseint/index.md b/files/en-us/web/javascript/reference/global_objects/number/parseint/index.md index 359c6a68ce8abfb..91418c61453ac71 100644 --- a/files/en-us/web/javascript/reference/global_objects/number/parseint/index.md +++ b/files/en-us/web/javascript/reference/global_objects/number/parseint/index.md @@ -79,5 +79,6 @@ Its purpose is modularization of globals. Please see ## See also - [Polyfill of `Number.parseInt` in `core-js`](https://github.com/zloirock/core-js#ecmascript-number) +- [es-shims polyfill of `Number.parseInt`](https://www.npmjs.com/package/number.parseInt) - {{jsxref("Number")}} - {{jsxref("parseInt()")}} diff --git a/files/en-us/web/javascript/reference/global_objects/number/toexponential/index.md b/files/en-us/web/javascript/reference/global_objects/number/toexponential/index.md index 86a78829bf975b5..3c11f312df1233b 100644 --- a/files/en-us/web/javascript/reference/global_objects/number/toexponential/index.md +++ b/files/en-us/web/javascript/reference/global_objects/number/toexponential/index.md @@ -94,6 +94,7 @@ console.log((77).toExponential()); // 7.7e+1 ## See also - [Polyfill of `Number.prototype.toExponential` with many bug fixes in `core-js`](https://github.com/zloirock/core-js#ecmascript-number) +- [es-shims polyfill of `Number.prototype.toExponential`](https://www.npmjs.com/package/number.prototype.toexponential) - {{jsxref("Number.prototype.toFixed()")}} - {{jsxref("Number.prototype.toPrecision()")}} - {{jsxref("Number.prototype.toString()")}} diff --git a/files/en-us/web/javascript/reference/global_objects/object/assign/index.md b/files/en-us/web/javascript/reference/global_objects/object/assign/index.md index fd87048c192281a..0f881cda13d6f3e 100644 --- a/files/en-us/web/javascript/reference/global_objects/object/assign/index.md +++ b/files/en-us/web/javascript/reference/global_objects/object/assign/index.md @@ -260,6 +260,7 @@ console.log(copy); ## See also - [Polyfill of `Object.assign` in `core-js`](https://github.com/zloirock/core-js#ecmascript-object) +- [es-shims polyfill of `Object.assign`](https://www.npmjs.com/package/object.assign) - {{jsxref("Object.defineProperties()")}} - [Enumerability and ownership of properties](/en-US/docs/Web/JavaScript/Enumerability_and_ownership_of_properties) - [Spread in object literals](/en-US/docs/Web/JavaScript/Reference/Operators/Spread_syntax#spread_in_object_literals) diff --git a/files/en-us/web/javascript/reference/global_objects/object/defineproperties/index.md b/files/en-us/web/javascript/reference/global_objects/object/defineproperties/index.md index e7bf31c79959a5b..4e50f78fcb7c52e 100644 --- a/files/en-us/web/javascript/reference/global_objects/object/defineproperties/index.md +++ b/files/en-us/web/javascript/reference/global_objects/object/defineproperties/index.md @@ -118,6 +118,7 @@ Object.defineProperties(obj, { ## See also - [Polyfill of `Object.defineProperties` in `core-js`](https://github.com/zloirock/core-js#ecmascript-object) +- [es-shims polyfill of `Object.defineProperties`](https://www.npmjs.com/package/object.defineproperties) - {{jsxref("Object.defineProperty()")}} - {{jsxref("Object.keys()")}} - [Enumerability and ownership of properties](/en-US/docs/Web/JavaScript/Enumerability_and_ownership_of_properties) diff --git a/files/en-us/web/javascript/reference/global_objects/object/entries/index.md b/files/en-us/web/javascript/reference/global_objects/object/entries/index.md index 4d3aa7fdc77e604..48ac322879741bf 100644 --- a/files/en-us/web/javascript/reference/global_objects/object/entries/index.md +++ b/files/en-us/web/javascript/reference/global_objects/object/entries/index.md @@ -126,6 +126,7 @@ Object.entries(obj).forEach(([key, value]) => { ## See also - [Polyfill of `Object.entries` in `core-js`](https://github.com/zloirock/core-js#ecmascript-object) +- [es-shims polyfill of `Object.entries`](https://www.npmjs.com/package/object.entries) - [Enumerability and ownership of properties](/en-US/docs/Web/JavaScript/Enumerability_and_ownership_of_properties) - {{jsxref("Object.keys()")}} - {{jsxref("Object.values()")}} diff --git a/files/en-us/web/javascript/reference/global_objects/object/fromentries/index.md b/files/en-us/web/javascript/reference/global_objects/object/fromentries/index.md index 9b89e5b257c4277..3ec9ec6493bc758 100644 --- a/files/en-us/web/javascript/reference/global_objects/object/fromentries/index.md +++ b/files/en-us/web/javascript/reference/global_objects/object/fromentries/index.md @@ -110,6 +110,7 @@ console.log(object2); ## See also - [Polyfill of `Object.fromEntries` in `core-js`](https://github.com/zloirock/core-js#ecmascript-object) +- [es-shims polyfill of `Object.fromEntries`](https://www.npmjs.com/package/object.fromentries) - {{jsxref("Object.entries()")}} - {{jsxref("Object.keys()")}} - {{jsxref("Object.values()")}} diff --git a/files/en-us/web/javascript/reference/global_objects/object/getownpropertydescriptors/index.md b/files/en-us/web/javascript/reference/global_objects/object/getownpropertydescriptors/index.md index a595623290b4ef4..4b87b345260a414 100644 --- a/files/en-us/web/javascript/reference/global_objects/object/getownpropertydescriptors/index.md +++ b/files/en-us/web/javascript/reference/global_objects/object/getownpropertydescriptors/index.md @@ -114,5 +114,6 @@ subclass.prototype = Object.create(superclass.prototype, { ## See also - [Polyfill of `Object.getOwnPropertyDescriptors` in `core-js`](https://github.com/zloirock/core-js#ecmascript-object) +- [es-shims polyfill of `Object.getOwnPropertyDescriptors`](https://www.npmjs.com/package/object.getownpropertydescriptors) - {{jsxref("Object.getOwnPropertyDescriptor()")}} - {{jsxref("Object.defineProperty()")}} diff --git a/files/en-us/web/javascript/reference/global_objects/object/getprototypeof/index.md b/files/en-us/web/javascript/reference/global_objects/object/getprototypeof/index.md index 44c11d378ba69da..c9a3fce26c6f6d1 100644 --- a/files/en-us/web/javascript/reference/global_objects/object/getprototypeof/index.md +++ b/files/en-us/web/javascript/reference/global_objects/object/getprototypeof/index.md @@ -70,6 +70,7 @@ Object.getPrototypeOf("foo"); ## See also - [Polyfill of `Object.getPrototypeOf` in `core-js`](https://github.com/zloirock/core-js#ecmascript-object) +- [es-shims polyfill of `Object.getPrototypeOf`](https://www.npmjs.com/package/object.getprototypeof) - {{jsxref("Object.prototype.isPrototypeOf()")}} - {{jsxref("Object.setPrototypeOf()")}} - [`Object.prototype.__proto__`](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/proto) diff --git a/files/en-us/web/javascript/reference/global_objects/object/groupby/index.md b/files/en-us/web/javascript/reference/global_objects/object/groupby/index.md index b653f6b857a8c36..3fcc12f86ebce0c 100644 --- a/files/en-us/web/javascript/reference/global_objects/object/groupby/index.md +++ b/files/en-us/web/javascript/reference/global_objects/object/groupby/index.md @@ -119,6 +119,7 @@ const result2 = Object.groupBy(inventory, myCallback); ## See also - [Polyfill of `Object.groupBy` in `core-js`](https://github.com/zloirock/core-js#array-grouping) +- [es-shims polyfill of `Object.groupBy`](https://www.npmjs.com/package/object.groupby) - [Indexed collections](/en-US/docs/Web/JavaScript/Guide/Indexed_collections) guide - {{jsxref("Array.prototype.reduce()")}} - {{jsxref("Object.fromEntries()")}} diff --git a/files/en-us/web/javascript/reference/global_objects/object/hasown/index.md b/files/en-us/web/javascript/reference/global_objects/object/hasown/index.md index cbcc63ca72f9d7c..a636cf3258eb35d 100644 --- a/files/en-us/web/javascript/reference/global_objects/object/hasown/index.md +++ b/files/en-us/web/javascript/reference/global_objects/object/hasown/index.md @@ -174,6 +174,7 @@ if (Object.hasOwn(foo, "prop")) { ## See also - [Polyfill of `Object.hasOwn` in `core-js`](https://github.com/zloirock/core-js#ecmascript-object) +- [es-shims polyfill of `Object.hasOwn`](https://www.npmjs.com/package/object.hasown) - {{jsxref("Object.prototype.hasOwnProperty()")}} - [Enumerability and ownership of properties](/en-US/docs/Web/JavaScript/Enumerability_and_ownership_of_properties) - {{jsxref("Object.getOwnPropertyNames()")}} diff --git a/files/en-us/web/javascript/reference/global_objects/object/is/index.md b/files/en-us/web/javascript/reference/global_objects/object/is/index.md index 226ddff5f8775bf..c2d7d3ecfeedc7c 100644 --- a/files/en-us/web/javascript/reference/global_objects/object/is/index.md +++ b/files/en-us/web/javascript/reference/global_objects/object/is/index.md @@ -106,4 +106,5 @@ Object.is(NaN, Number.NaN); // true ## See also - [Polyfill of `Object.is` in `core-js`](https://github.com/zloirock/core-js#ecmascript-object) +- [es-shims polyfill of `Object.is`](https://www.npmjs.com/package/object.is) - [Equality comparisons and sameness](/en-US/docs/Web/JavaScript/Equality_comparisons_and_sameness) diff --git a/files/en-us/web/javascript/reference/global_objects/object/keys/index.md b/files/en-us/web/javascript/reference/global_objects/object/keys/index.md index 28e5a875e4dabd3..b02544f2bbd5de7 100644 --- a/files/en-us/web/javascript/reference/global_objects/object/keys/index.md +++ b/files/en-us/web/javascript/reference/global_objects/object/keys/index.md @@ -103,6 +103,7 @@ console.log(Object.keys(100)); // [] ## See also - [Polyfill of `Object.keys` in `core-js`](https://github.com/zloirock/core-js#ecmascript-object) +- [es-shims polyfill of `Object.keys`](https://www.npmjs.com/package/object-key) - [Enumerability and ownership of properties](/en-US/docs/Web/JavaScript/Enumerability_and_ownership_of_properties) - {{jsxref("Object.entries()")}} - {{jsxref("Object.values()")}} diff --git a/files/en-us/web/javascript/reference/global_objects/object/values/index.md b/files/en-us/web/javascript/reference/global_objects/object/values/index.md index 05a7decf2c43b58..20aa792264a2bce 100644 --- a/files/en-us/web/javascript/reference/global_objects/object/values/index.md +++ b/files/en-us/web/javascript/reference/global_objects/object/values/index.md @@ -98,6 +98,7 @@ console.log(Object.values(100)); // [] ## See also - [Polyfill of `Object.values` in `core-js`](https://github.com/zloirock/core-js#ecmascript-object) +- [es-shims polyfill of `Object.values`](https://www.npmjs.com/package/object.values) - [Enumerability and ownership of properties](/en-US/docs/Web/JavaScript/Enumerability_and_ownership_of_properties) - {{jsxref("Object.keys()")}} - {{jsxref("Object.entries()")}} diff --git a/files/en-us/web/javascript/reference/global_objects/promise/allsettled/index.md b/files/en-us/web/javascript/reference/global_objects/promise/allsettled/index.md index 82bcb293fb91ff6..45bb1ecda9ccd72 100644 --- a/files/en-us/web/javascript/reference/global_objects/promise/allsettled/index.md +++ b/files/en-us/web/javascript/reference/global_objects/promise/allsettled/index.md @@ -91,6 +91,7 @@ Promise.allSettled([ ## See also - [Polyfill of `Promise.allSettled` in `core-js`](https://github.com/zloirock/core-js#ecmascript-promise) +- [es-shims polyfill of `Promise.allSettled`](https://www.npmjs.com/package/promise.allsettled) - [Using promises](/en-US/docs/Web/JavaScript/Guide/Using_promises) guide - [Graceful asynchronous programming with promises](/en-US/docs/Learn_web_development/Extensions/Async_JS/Promises) - {{jsxref("Promise")}} diff --git a/files/en-us/web/javascript/reference/global_objects/promise/any/index.md b/files/en-us/web/javascript/reference/global_objects/promise/any/index.md index 1776f25d1d9659d..28d37f232af5192 100644 --- a/files/en-us/web/javascript/reference/global_objects/promise/any/index.md +++ b/files/en-us/web/javascript/reference/global_objects/promise/any/index.md @@ -133,6 +133,7 @@ Promise.any([coffee, tea]) ## See also - [Polyfill of `Promise.any` in `core-js`](https://github.com/zloirock/core-js#ecmascript-promise) +- [es-shims polyfill of `Promise.any`](https://www.npmjs.com/package/promise.any) - {{jsxref("Promise")}} - {{jsxref("Promise.all()")}} - {{jsxref("Promise.allSettled()")}} diff --git a/files/en-us/web/javascript/reference/global_objects/promise/finally/index.md b/files/en-us/web/javascript/reference/global_objects/promise/finally/index.md index 2dde5b56bc98947..b347462d264ee2c 100644 --- a/files/en-us/web/javascript/reference/global_objects/promise/finally/index.md +++ b/files/en-us/web/javascript/reference/global_objects/promise/finally/index.md @@ -120,6 +120,7 @@ fetch(myRequest) ## See also - [Polyfill of `Promise.prototype.finally` in `core-js`](https://github.com/zloirock/core-js#ecmascript-promise) +- [es-shims polyfill of `Promise.prototype.finally`](https://www.npmjs.com/package/promise.prototype.finally) - {{jsxref("Promise")}} - {{jsxref("Promise.prototype.then()")}} - {{jsxref("Promise.prototype.catch()")}} diff --git a/files/en-us/web/javascript/reference/global_objects/promise/try/index.md b/files/en-us/web/javascript/reference/global_objects/promise/try/index.md index e24e9af61977eeb..ba695c998272619 100644 --- a/files/en-us/web/javascript/reference/global_objects/promise/try/index.md +++ b/files/en-us/web/javascript/reference/global_objects/promise/try/index.md @@ -171,6 +171,7 @@ Unlike `Promise()`, this `NotPromise()` constructor _does not_ gracefully handle ## See also - [Polyfill of `Promise.try` in `core-js`](https://github.com/zloirock/core-js#promisetry) +- [es-shims polyfill of `Promise.try`](https://www.npmjs.com/package/promise.try) - [Using promises](/en-US/docs/Web/JavaScript/Guide/Using_promises) guide - {{jsxref("Promise")}} - [`Promise()` constructor](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/Promise) diff --git a/files/en-us/web/javascript/reference/global_objects/promise/withresolvers/index.md b/files/en-us/web/javascript/reference/global_objects/promise/withresolvers/index.md index 21aa28bc456799d..adbe8b6bddd8b51 100644 --- a/files/en-us/web/javascript/reference/global_objects/promise/withresolvers/index.md +++ b/files/en-us/web/javascript/reference/global_objects/promise/withresolvers/index.md @@ -104,6 +104,7 @@ resolve("hello"); ## See also - [Polyfill of `Promise.withResolvers` in `core-js`](https://github.com/zloirock/core-js#promisewithresolvers) +- [es-shims polyfill of `Promise.withResolvers`](https://www.npmjs.com/package/promise.withresolvers) - [Using promises](/en-US/docs/Web/JavaScript/Guide/Using_promises) guide - {{jsxref("Promise")}} - [`Promise()` constructor](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/Promise) diff --git a/files/en-us/web/javascript/reference/global_objects/reflect/apply/index.md b/files/en-us/web/javascript/reference/global_objects/reflect/apply/index.md index 117819c82e910a9..46857a4cf821d76 100644 --- a/files/en-us/web/javascript/reference/global_objects/reflect/apply/index.md +++ b/files/en-us/web/javascript/reference/global_objects/reflect/apply/index.md @@ -98,6 +98,7 @@ Reflect.apply("".charAt, "ponies", [3]); ## See also - [Polyfill of `Reflect.apply` in `core-js`](https://github.com/zloirock/core-js#ecmascript-reflect) +- [es-shims polyfill of `Reflect.apply`](https://www.npmjs.com/package/reflect-apply) - {{jsxref("Reflect")}} - {{jsxref("Function.prototype.apply()")}} - [`handler.apply()`](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/Proxy/apply) diff --git a/files/en-us/web/javascript/reference/global_objects/reflect/getprototypeof/index.md b/files/en-us/web/javascript/reference/global_objects/reflect/getprototypeof/index.md index 4935107603de6c3..a1489c250bbda86 100644 --- a/files/en-us/web/javascript/reference/global_objects/reflect/getprototypeof/index.md +++ b/files/en-us/web/javascript/reference/global_objects/reflect/getprototypeof/index.md @@ -91,6 +91,7 @@ Reflect.getPrototypeOf(Object("foo")); // String.prototype ## See also - [Polyfill of `Reflect.getPrototypeOf` in `core-js`](https://github.com/zloirock/core-js#ecmascript-reflect) +- [es-shims polyfill of `Reflect.getPrototypeOf`](https://www.npmjs.com/package/reflect.getprototypeof) - {{jsxref("Reflect")}} - {{jsxref("Object.getPrototypeOf()")}} - [`handler.getPrototypeOf()`](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/Proxy/getPrototypeOf) diff --git a/files/en-us/web/javascript/reference/global_objects/reflect/ownkeys/index.md b/files/en-us/web/javascript/reference/global_objects/reflect/ownkeys/index.md index dba898a93eade17..f6f95370f56459d 100644 --- a/files/en-us/web/javascript/reference/global_objects/reflect/ownkeys/index.md +++ b/files/en-us/web/javascript/reference/global_objects/reflect/ownkeys/index.md @@ -94,6 +94,7 @@ Reflect.ownKeys(obj); ## See also - [Polyfill of `Reflect.ownKeys` in `core-js`](https://github.com/zloirock/core-js#ecmascript-reflect) +- [es-shims polyfill of `Reflect.ownKeys`](https://www.npmjs.com/package/reflect.ownkeys) - {{jsxref("Reflect")}} - {{jsxref("Object.getOwnPropertyNames()")}} - {{jsxref("Object.getOwnPropertySymbols()")}} diff --git a/files/en-us/web/javascript/reference/global_objects/regexp/escape/index.md b/files/en-us/web/javascript/reference/global_objects/regexp/escape/index.md index f7a3b0a04c8022b..929a86c479e1c9d 100644 --- a/files/en-us/web/javascript/reference/global_objects/regexp/escape/index.md +++ b/files/en-us/web/javascript/reference/global_objects/regexp/escape/index.md @@ -105,4 +105,5 @@ Now this function will do exactly what we intend to, and will not transform `dev ## See also - [Polyfill of `RegExp.escape` in `core-js`](https://github.com/zloirock/core-js#regexp-escaping) +- [es-shims polyfill of `Reflect.escape`](https://www.npmjs.com/package/regexp.escape) - {{jsxref("RegExp")}} diff --git a/files/en-us/web/javascript/reference/global_objects/regexp/flags/index.md b/files/en-us/web/javascript/reference/global_objects/regexp/flags/index.md index ecd7a72816142f6..57502565bc8e7d2 100644 --- a/files/en-us/web/javascript/reference/global_objects/regexp/flags/index.md +++ b/files/en-us/web/javascript/reference/global_objects/regexp/flags/index.md @@ -49,5 +49,6 @@ The set accessor of `flags` is `undefined`. You cannot change this property dire ## See also - [Polyfill of `RegExp.prototype.flags` in `core-js`](https://github.com/zloirock/core-js#ecmascript-string-and-regexp) +- [es-shims polyfill of `RegExp.prototype.flags`](https://www.npmjs.com/package/regexp.prototype.flags) - [Advanced searching with flags](/en-US/docs/Web/JavaScript/Guide/Regular_expressions#advanced_searching_with_flags) in the Regular expressions guide - {{jsxref("RegExp.prototype.source")}} diff --git a/files/en-us/web/javascript/reference/global_objects/regexp/symbol.matchall/index.md b/files/en-us/web/javascript/reference/global_objects/regexp/symbol.matchall/index.md index 95d9e0aa549f3ae..c361d4871b925e1 100644 --- a/files/en-us/web/javascript/reference/global_objects/regexp/symbol.matchall/index.md +++ b/files/en-us/web/javascript/reference/global_objects/regexp/symbol.matchall/index.md @@ -134,6 +134,7 @@ console.log(result[1]); ## See also - [Polyfill of `RegExp.prototype[Symbol.matchAll]` in `core-js`](https://github.com/zloirock/core-js#ecmascript-string-and-regexp) +- [es-shims polyfill of `RegExp.prototype[Symbol.matchAll]`](https://www.npmjs.com/package/string.prototype.matchall) - {{jsxref("String.prototype.matchAll()")}} - [`RegExp.prototype[Symbol.match]()`](/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/Symbol.match) - [`RegExp.prototype[Symbol.replace]()`](/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/Symbol.replace) diff --git a/files/en-us/web/javascript/reference/global_objects/set/difference/index.md b/files/en-us/web/javascript/reference/global_objects/set/difference/index.md index 432569e904d5432..995ecb319acc5c9 100644 --- a/files/en-us/web/javascript/reference/global_objects/set/difference/index.md +++ b/files/en-us/web/javascript/reference/global_objects/set/difference/index.md @@ -69,6 +69,7 @@ console.log(odds.difference(squares)); // Set(3) { 3, 5, 7 } ## See also - [Polyfill of `Set.prototype.difference` in `core-js`](https://github.com/zloirock/core-js#new-set-methods) +- [es-shims polyfill of `Set.prototype.difference`](https://www.npmjs.com/package/set.prototype.difference) - {{jsxref("Set.prototype.intersection()")}} - {{jsxref("Set.prototype.isDisjointFrom()")}} - {{jsxref("Set.prototype.isSubsetOf()")}} diff --git a/files/en-us/web/javascript/reference/global_objects/set/index.md b/files/en-us/web/javascript/reference/global_objects/set/index.md index 692d7516065c47d..8fbab06de96e2c8 100644 --- a/files/en-us/web/javascript/reference/global_objects/set/index.md +++ b/files/en-us/web/javascript/reference/global_objects/set/index.md @@ -419,6 +419,7 @@ console.assert(set.size === array.length); ## See also - [Polyfill of `Set` in `core-js`](https://github.com/zloirock/core-js#set) +- [es-shims polyfill of `Set`](https://www.npmjs.com/package/es-set) - {{jsxref("Map")}} - {{jsxref("WeakMap")}} - {{jsxref("WeakSet")}} diff --git a/files/en-us/web/javascript/reference/global_objects/set/intersection/index.md b/files/en-us/web/javascript/reference/global_objects/set/intersection/index.md index 7de2850a18cfb7b..3ded2d7a8bf4c91 100644 --- a/files/en-us/web/javascript/reference/global_objects/set/intersection/index.md +++ b/files/en-us/web/javascript/reference/global_objects/set/intersection/index.md @@ -69,6 +69,7 @@ console.log(odds.intersection(squares)); // Set(2) { 1, 9 } ## See also - [Polyfill of `Set.prototype.intersection` in `core-js`](https://github.com/zloirock/core-js#new-set-methods) +- [es-shims polyfill of `Set.prototype.intersection`](https://www.npmjs.com/package/set.prototype.intersection) - {{jsxref("Set.prototype.difference()")}} - {{jsxref("Set.prototype.isDisjointFrom()")}} - {{jsxref("Set.prototype.isSubsetOf()")}} diff --git a/files/en-us/web/javascript/reference/global_objects/set/isdisjointfrom/index.md b/files/en-us/web/javascript/reference/global_objects/set/isdisjointfrom/index.md index fdce79c7d09123e..6633f4b5fb50b8d 100644 --- a/files/en-us/web/javascript/reference/global_objects/set/isdisjointfrom/index.md +++ b/files/en-us/web/javascript/reference/global_objects/set/isdisjointfrom/index.md @@ -76,6 +76,7 @@ console.log(composites.isDisjointFrom(squares)); // false ## See also - [Polyfill of `Set.prototype.isDisjointFrom` in `core-js`](https://github.com/zloirock/core-js#new-set-methods) +- [es-shims polyfill of `Set.prototype.isDisjointFrom`](https://www.npmjs.com/package/set.prototype.isdisjointfrom) - {{jsxref("Set.prototype.difference()")}} - {{jsxref("Set.prototype.intersection()")}} - {{jsxref("Set.prototype.isSubsetOf()")}} diff --git a/files/en-us/web/javascript/reference/global_objects/set/issubsetof/index.md b/files/en-us/web/javascript/reference/global_objects/set/issubsetof/index.md index 291bafd79efcce9..b5835327b9e8c7a 100644 --- a/files/en-us/web/javascript/reference/global_objects/set/issubsetof/index.md +++ b/files/en-us/web/javascript/reference/global_objects/set/issubsetof/index.md @@ -86,6 +86,7 @@ console.log(set2.isSubsetOf(set1)); // true ## See also - [Polyfill of `Set.prototype.isSubsetOf` in `core-js`](https://github.com/zloirock/core-js#new-set-methods) +- [es-shims polyfill of `Set.prototype.isSubsetOf`](https://www.npmjs.com/package/set.prototype.issubsetof) - {{jsxref("Set.prototype.difference()")}} - {{jsxref("Set.prototype.intersection()")}} - {{jsxref("Set.prototype.isDisjointFrom()")}} diff --git a/files/en-us/web/javascript/reference/global_objects/set/issupersetof/index.md b/files/en-us/web/javascript/reference/global_objects/set/issupersetof/index.md index a29f16711ae4f08..26155e12ce2cde7 100644 --- a/files/en-us/web/javascript/reference/global_objects/set/issupersetof/index.md +++ b/files/en-us/web/javascript/reference/global_objects/set/issupersetof/index.md @@ -86,6 +86,7 @@ console.log(set2.isSupersetOf(set1)); // true ## See also - [Polyfill of `Set.prototype.isSupersetOf` in `core-js`](https://github.com/zloirock/core-js#new-set-methods) +- [es-shims polyfill of `Set.prototype.isSupersetOf`](https://www.npmjs.com/package/set.prototype.issupersetof) - {{jsxref("Set.prototype.difference()")}} - {{jsxref("Set.prototype.intersection()")}} - {{jsxref("Set.prototype.isDisjointFrom()")}} diff --git a/files/en-us/web/javascript/reference/global_objects/set/set/index.md b/files/en-us/web/javascript/reference/global_objects/set/set/index.md index bfc110b90c501dc..86008b524afa2f1 100644 --- a/files/en-us/web/javascript/reference/global_objects/set/set/index.md +++ b/files/en-us/web/javascript/reference/global_objects/set/set/index.md @@ -73,4 +73,5 @@ mySet.add(o); ## See also - [Polyfill of `Set` in `core-js`](https://github.com/zloirock/core-js#set) +- [es-shims polyfill of `Set`](https://www.npmjs.com/package/es-set) - {{jsxref("Set")}} diff --git a/files/en-us/web/javascript/reference/global_objects/set/symmetricdifference/index.md b/files/en-us/web/javascript/reference/global_objects/set/symmetricdifference/index.md index 0a31e6c1835db40..fcff72ca5aad615 100644 --- a/files/en-us/web/javascript/reference/global_objects/set/symmetricdifference/index.md +++ b/files/en-us/web/javascript/reference/global_objects/set/symmetricdifference/index.md @@ -65,6 +65,7 @@ console.log(evens.symmetricDifference(squares)); // Set(5) { 2, 6, 8, 1, 9 } ## See also - [Polyfill of `Set.prototype.symmetricDifference` in `core-js`](https://github.com/zloirock/core-js#new-set-methods) +- [es-shims polyfill of `Set.prototype.symmetricDifference`](https://www.npmjs.com/package/set.prototype.symmetricdifference) - {{jsxref("Set.prototype.difference()")}} - {{jsxref("Set.prototype.intersection()")}} - {{jsxref("Set.prototype.isDisjointFrom()")}} diff --git a/files/en-us/web/javascript/reference/global_objects/set/union/index.md b/files/en-us/web/javascript/reference/global_objects/set/union/index.md index 4f96ed46632c80f..3a734ef4d404c01 100644 --- a/files/en-us/web/javascript/reference/global_objects/set/union/index.md +++ b/files/en-us/web/javascript/reference/global_objects/set/union/index.md @@ -66,6 +66,7 @@ console.log(evens.union(squares)); // Set(6) { 2, 4, 6, 8, 1, 9 } ## See also - [Polyfill of `Set.prototype.union` in `core-js`](https://github.com/zloirock/core-js#new-set-methods) +- [es-shims polyfill of `Set.prototype.union`](https://www.npmjs.com/package/set.prototype.union) - {{jsxref("Set.prototype.difference()")}} - {{jsxref("Set.prototype.intersection()")}} - {{jsxref("Set.prototype.isDisjointFrom()")}} diff --git a/files/en-us/web/javascript/reference/global_objects/string/anchor/index.md b/files/en-us/web/javascript/reference/global_objects/string/anchor/index.md index 10c7b40d2029472..c7622e74a0b9bf3 100644 --- a/files/en-us/web/javascript/reference/global_objects/string/anchor/index.md +++ b/files/en-us/web/javascript/reference/global_objects/string/anchor/index.md @@ -72,5 +72,6 @@ document.body.appendChild(elem); ## See also - [Polyfill of `String.prototype.anchor` in `core-js`](https://github.com/zloirock/core-js#ecmascript-string-and-regexp) +- [es-shims polyfill of `String.prototype.anchor`](https://www.npmjs.com/package/es-string-html-methods) - [HTML wrapper methods](/en-US/docs/Web/JavaScript/Reference/Global_Objects/String#html_wrapper_methods) - {{HTMLElement("a")}} diff --git a/files/en-us/web/javascript/reference/global_objects/string/at/index.md b/files/en-us/web/javascript/reference/global_objects/string/at/index.md index 964e7ca3a8b2fcd..e8e0bb05dcacb0b 100644 --- a/files/en-us/web/javascript/reference/global_objects/string/at/index.md +++ b/files/en-us/web/javascript/reference/global_objects/string/at/index.md @@ -92,6 +92,7 @@ console.log(atWay); // 't' ## See also - [Polyfill of `String.prototype.at` in `core-js`](https://github.com/zloirock/core-js#ecmascript-string-and-regexp) +- [es-shims polyfill of `String.prototype.at`](https://www.npmjs.com/package/string.prototype.at) - {{jsxref("String.prototype.indexOf()")}} - {{jsxref("String.prototype.lastIndexOf()")}} - {{jsxref("String.prototype.charCodeAt()")}} diff --git a/files/en-us/web/javascript/reference/global_objects/string/big/index.md b/files/en-us/web/javascript/reference/global_objects/string/big/index.md index b2881a4ea47a2b3..dc8c7de99712705 100644 --- a/files/en-us/web/javascript/reference/global_objects/string/big/index.md +++ b/files/en-us/web/javascript/reference/global_objects/string/big/index.md @@ -66,5 +66,6 @@ document.getElementById("yourElemId").style.fontSize = "2em"; ## See also - [Polyfill of `String.prototype.big` in `core-js`](https://github.com/zloirock/core-js#ecmascript-string-and-regexp) +- [es-shims polyfill of `String.prototype.big`](https://www.npmjs.com/package/es-string-html-methods) - [HTML wrapper methods](/en-US/docs/Web/JavaScript/Reference/Global_Objects/String#html_wrapper_methods) - {{HTMLElement("big")}} diff --git a/files/en-us/web/javascript/reference/global_objects/string/blink/index.md b/files/en-us/web/javascript/reference/global_objects/string/blink/index.md index dd72ddb28a97029..27085c8f9c4e856 100644 --- a/files/en-us/web/javascript/reference/global_objects/string/blink/index.md +++ b/files/en-us/web/javascript/reference/global_objects/string/blink/index.md @@ -62,4 +62,5 @@ You should avoid blinking elements altogether. ## See also - [Polyfill of `String.prototype.blink` in `core-js`](https://github.com/zloirock/core-js#ecmascript-string-and-regexp) +- [es-shims polyfill of `String.prototype.blink`](https://www.npmjs.com/package/es-string-html-methods) - [HTML wrapper methods](/en-US/docs/Web/JavaScript/Reference/Global_Objects/String#html_wrapper_methods) diff --git a/files/en-us/web/javascript/reference/global_objects/string/bold/index.md b/files/en-us/web/javascript/reference/global_objects/string/bold/index.md index c3430fe0e82a3ad..7145671c8f6bd71 100644 --- a/files/en-us/web/javascript/reference/global_objects/string/bold/index.md +++ b/files/en-us/web/javascript/reference/global_objects/string/bold/index.md @@ -66,5 +66,6 @@ document.body.appendChild(elem); ## See also - [Polyfill of `String.prototype.bold` in `core-js`](https://github.com/zloirock/core-js#ecmascript-string-and-regexp) +- [es-shims polyfill of `String.prototype.bold`](https://www.npmjs.com/package/es-string-html-methods) - [HTML wrapper methods](/en-US/docs/Web/JavaScript/Reference/Global_Objects/String#html_wrapper_methods) - {{HTMLElement("b")}} diff --git a/files/en-us/web/javascript/reference/global_objects/string/codepointat/index.md b/files/en-us/web/javascript/reference/global_objects/string/codepointat/index.md index 8fd3cbbe41a8591..e5079b59de2d921 100644 --- a/files/en-us/web/javascript/reference/global_objects/string/codepointat/index.md +++ b/files/en-us/web/javascript/reference/global_objects/string/codepointat/index.md @@ -98,6 +98,7 @@ for (const codePoint of str) { ## See also - [Polyfill of `String.prototype.codePointAt` in `core-js`](https://github.com/zloirock/core-js#ecmascript-string-and-regexp) +- [es-shims polyfill of `String.prototype.codePointAt`](https://www.npmjs.com/package/string.prototype.codepointat) - {{jsxref("String.fromCodePoint()")}} - {{jsxref("String.fromCharCode()")}} - {{jsxref("String.prototype.charCodeAt()")}} diff --git a/files/en-us/web/javascript/reference/global_objects/string/endswith/index.md b/files/en-us/web/javascript/reference/global_objects/string/endswith/index.md index c4c2b3a9d347f64..0b4965c6b628728 100644 --- a/files/en-us/web/javascript/reference/global_objects/string/endswith/index.md +++ b/files/en-us/web/javascript/reference/global_objects/string/endswith/index.md @@ -76,6 +76,7 @@ console.log(str.endsWith("to be", 19)); // true ## See also - [Polyfill of `String.prototype.endsWith` in `core-js`](https://github.com/zloirock/core-js#ecmascript-string-and-regexp) +- [es-shims polyfill of `String.prototype.endsWith`](https://www.npmjs.com/package/string.prototype.endswith) - {{jsxref("String.prototype.startsWith()")}} - {{jsxref("String.prototype.includes()")}} - {{jsxref("String.prototype.indexOf()")}} diff --git a/files/en-us/web/javascript/reference/global_objects/string/fixed/index.md b/files/en-us/web/javascript/reference/global_objects/string/fixed/index.md index 753bc660c22374c..3d941b51d09cb92 100644 --- a/files/en-us/web/javascript/reference/global_objects/string/fixed/index.md +++ b/files/en-us/web/javascript/reference/global_objects/string/fixed/index.md @@ -66,5 +66,6 @@ document.getElementById("yourElemId").style.fontFamily = "monospace"; ## See also - [Polyfill of `String.prototype.fixed` in `core-js`](https://github.com/zloirock/core-js#ecmascript-string-and-regexp) +- [es-shims polyfill of `String.prototype.fixed`](https://www.npmjs.com/package/es-string-html-methods) - [HTML wrapper methods](/en-US/docs/Web/JavaScript/Reference/Global_Objects/String#html_wrapper_methods) - {{HTMLElement("tt")}} diff --git a/files/en-us/web/javascript/reference/global_objects/string/fontcolor/index.md b/files/en-us/web/javascript/reference/global_objects/string/fontcolor/index.md index 54ebe4ee25d2043..714485e77bfa0c9 100644 --- a/files/en-us/web/javascript/reference/global_objects/string/fontcolor/index.md +++ b/files/en-us/web/javascript/reference/global_objects/string/fontcolor/index.md @@ -71,5 +71,6 @@ document.getElementById("yourElemId").style.color = "red"; ## See also - [Polyfill of `String.prototype.fontcolor` in `core-js`](https://github.com/zloirock/core-js#ecmascript-string-and-regexp) +- [es-shims polyfill of `String.prototype.fontcolor`](https://www.npmjs.com/package/es-string-html-methods) - [HTML wrapper methods](/en-US/docs/Web/JavaScript/Reference/Global_Objects/String#html_wrapper_methods) - {{HTMLElement("font")}} diff --git a/files/en-us/web/javascript/reference/global_objects/string/fontsize/index.md b/files/en-us/web/javascript/reference/global_objects/string/fontsize/index.md index 14a29c60696fdf6..db258c1d753e401 100644 --- a/files/en-us/web/javascript/reference/global_objects/string/fontsize/index.md +++ b/files/en-us/web/javascript/reference/global_objects/string/fontsize/index.md @@ -71,5 +71,6 @@ document.getElementById("yourElemId").style.fontSize = "7pt"; ## See also - [Polyfill of `String.prototype.fontsize` in `core-js`](https://github.com/zloirock/core-js#ecmascript-string-and-regexp) +- [es-shims polyfill of `String.prototype.fontsize`](https://www.npmjs.com/package/es-string-html-methods) - [HTML wrapper methods](/en-US/docs/Web/JavaScript/Reference/Global_Objects/String#html_wrapper_methods) - {{HTMLElement("font")}} diff --git a/files/en-us/web/javascript/reference/global_objects/string/fromcodepoint/index.md b/files/en-us/web/javascript/reference/global_objects/string/fromcodepoint/index.md index c4ecf6f125ef226..664e45bbc29968f 100644 --- a/files/en-us/web/javascript/reference/global_objects/string/fromcodepoint/index.md +++ b/files/en-us/web/javascript/reference/global_objects/string/fromcodepoint/index.md @@ -97,6 +97,7 @@ String.fromCodePoint(0x1f303); // or 127747 in decimal ## See also - [Polyfill of `String.fromCodePoint` in `core-js`](https://github.com/zloirock/core-js#ecmascript-string-and-regexp) +- [es-shims polyfill of `String.fromCodePoint`](https://www.npmjs.com/package/string.fromcodepoint) - {{jsxref("String.fromCharCode()")}} - {{jsxref("String.prototype.charAt()")}} - {{jsxref("String.prototype.codePointAt()")}} diff --git a/files/en-us/web/javascript/reference/global_objects/string/includes/index.md b/files/en-us/web/javascript/reference/global_objects/string/includes/index.md index 914e987d549661e..c2ee3c1e8d5d490 100644 --- a/files/en-us/web/javascript/reference/global_objects/string/includes/index.md +++ b/files/en-us/web/javascript/reference/global_objects/string/includes/index.md @@ -91,6 +91,7 @@ console.log(str.includes("")); // true ## See also - [Polyfill of `String.prototype.includes` in `core-js`](https://github.com/zloirock/core-js#ecmascript-string-and-regexp) +- [es-shims polyfill of `String.prototype.includes`](https://www.npmjs.com/package/string.prototype.includes) - {{jsxref("Array.prototype.includes()")}} - {{jsxref("TypedArray.prototype.includes()")}} - {{jsxref("String.prototype.indexOf()")}} diff --git a/files/en-us/web/javascript/reference/global_objects/string/iswellformed/index.md b/files/en-us/web/javascript/reference/global_objects/string/iswellformed/index.md index 576d5eb735115d7..f68ff19b7646ab3 100644 --- a/files/en-us/web/javascript/reference/global_objects/string/iswellformed/index.md +++ b/files/en-us/web/javascript/reference/global_objects/string/iswellformed/index.md @@ -89,5 +89,6 @@ if (illFormed.isWellFormed()) { ## See also - [Polyfill of `String.prototype.isWellFormed` in `core-js`](https://github.com/zloirock/core-js#well-formed-unicode-strings) +- [es-shims polyfill of `String.prototype.isWellFormed`](https://www.npmjs.com/package/string.prototype.iswellformed) - {{jsxref("String.prototype.toWellFormed()")}} - {{jsxref("String.prototype.normalize()")}} diff --git a/files/en-us/web/javascript/reference/global_objects/string/italics/index.md b/files/en-us/web/javascript/reference/global_objects/string/italics/index.md index 31b6430dd5cc324..731e93be40fd098 100644 --- a/files/en-us/web/javascript/reference/global_objects/string/italics/index.md +++ b/files/en-us/web/javascript/reference/global_objects/string/italics/index.md @@ -66,5 +66,6 @@ document.body.appendChild(elem); ## See also - [Polyfill of `String.prototype.italics` in `core-js`](https://github.com/zloirock/core-js#ecmascript-string-and-regexp) +- [es-shims polyfill of `String.prototype.italics`](https://www.npmjs.com/package/es-string-html-methods) - [HTML wrapper methods](/en-US/docs/Web/JavaScript/Reference/Global_Objects/String#html_wrapper_methods) - {{HTMLElement("i")}} diff --git a/files/en-us/web/javascript/reference/global_objects/string/link/index.md b/files/en-us/web/javascript/reference/global_objects/string/link/index.md index 98293dc20dd4af0..5847935b54beba1 100644 --- a/files/en-us/web/javascript/reference/global_objects/string/link/index.md +++ b/files/en-us/web/javascript/reference/global_objects/string/link/index.md @@ -68,5 +68,6 @@ document.body.appendChild(elem); ## See also - [Polyfill of `String.prototype.link` in `core-js`](https://github.com/zloirock/core-js#ecmascript-string-and-regexp) +- [es-shims polyfill of `String.prototype.link`](https://www.npmjs.com/package/es-string-html-methods) - [HTML wrapper methods](/en-US/docs/Web/JavaScript/Reference/Global_Objects/String#html_wrapper_methods) - {{HTMLElement("a")}} diff --git a/files/en-us/web/javascript/reference/global_objects/string/matchall/index.md b/files/en-us/web/javascript/reference/global_objects/string/matchall/index.md index 03eb25fc666b697..62a411792dbb8e3 100644 --- a/files/en-us/web/javascript/reference/global_objects/string/matchall/index.md +++ b/files/en-us/web/javascript/reference/global_objects/string/matchall/index.md @@ -166,6 +166,7 @@ str.matchAll({ ## See also - [Polyfill of `String.prototype.matchAll` in `core-js`](https://github.com/zloirock/core-js#ecmascript-string-and-regexp) +- [es-shims polyfill of `String.prototype.matchAll`](https://www.npmjs.com/package/string.prototype.matchall) - [Regular expressions](/en-US/docs/Web/JavaScript/Guide/Regular_expressions) guide - [Groups and backreferences](/en-US/docs/Web/JavaScript/Guide/Regular_expressions/Groups_and_backreferences) guide - {{jsxref("String.prototype.match()")}} diff --git a/files/en-us/web/javascript/reference/global_objects/string/padend/index.md b/files/en-us/web/javascript/reference/global_objects/string/padend/index.md index c75d2c0eae529c3..605cadbfff4c20b 100644 --- a/files/en-us/web/javascript/reference/global_objects/string/padend/index.md +++ b/files/en-us/web/javascript/reference/global_objects/string/padend/index.md @@ -74,4 +74,5 @@ A {{jsxref("String")}} of the specified `targetLength` with the ## See also - [Polyfill of `String.prototype.padEnd` in `core-js`](https://github.com/zloirock/core-js#ecmascript-string-and-regexp) +- [es-shims polyfill of `String.prototype.padEnd`](https://www.npmjs.com/package/string.prototype.padend) - {{jsxref("String.prototype.padStart()")}} diff --git a/files/en-us/web/javascript/reference/global_objects/string/padstart/index.md b/files/en-us/web/javascript/reference/global_objects/string/padstart/index.md index dba1cd97184b32d..d753c5decf4dd66 100644 --- a/files/en-us/web/javascript/reference/global_objects/string/padstart/index.md +++ b/files/en-us/web/javascript/reference/global_objects/string/padstart/index.md @@ -86,4 +86,5 @@ console.log(leftFillNum(num, 5)); // "00123" ## See also - [Polyfill of `String.prototype.padStart` in `core-js`](https://github.com/zloirock/core-js#ecmascript-string-and-regexp) +- [es-shims polyfill of `String.prototype.padStart`](https://www.npmjs.com/package/string.prototype.padstart) - {{jsxref("String.prototype.padEnd()")}} diff --git a/files/en-us/web/javascript/reference/global_objects/string/raw/index.md b/files/en-us/web/javascript/reference/global_objects/string/raw/index.md index 5fd294b3a171fe8..c2f1276e96c1098 100644 --- a/files/en-us/web/javascript/reference/global_objects/string/raw/index.md +++ b/files/en-us/web/javascript/reference/global_objects/string/raw/index.md @@ -173,6 +173,7 @@ String.raw({ raw: "test" }, 0, 1, 2); // 't0e1s2t' ## See also - [Polyfill of `String.raw` in `core-js`](https://github.com/zloirock/core-js#ecmascript-string-and-regexp) +- [es-shims polyfill of `String.raw`](https://www.npmjs.com/package/string.raw) - [Template literals](/en-US/docs/Web/JavaScript/Reference/Template_literals) - {{jsxref("String")}} - [Lexical grammar](/en-US/docs/Web/JavaScript/Reference/Lexical_grammar) diff --git a/files/en-us/web/javascript/reference/global_objects/string/repeat/index.md b/files/en-us/web/javascript/reference/global_objects/string/repeat/index.md index 0a05e8d4ce03623..7d50ba7f1f3df6f 100644 --- a/files/en-us/web/javascript/reference/global_objects/string/repeat/index.md +++ b/files/en-us/web/javascript/reference/global_objects/string/repeat/index.md @@ -68,4 +68,5 @@ A new string containing the specified number of copies of the given string. ## See also - [Polyfill of `String.prototype.repeat` in `core-js`](https://github.com/zloirock/core-js#ecmascript-string-and-regexp) +- [es-shims polyfill of `String.prototype.repeat`](https://www.npmjs.com/package/string.prototype.repeat) - {{jsxref("String.prototype.concat()")}} diff --git a/files/en-us/web/javascript/reference/global_objects/string/replaceall/index.md b/files/en-us/web/javascript/reference/global_objects/string/replaceall/index.md index 3cfb7347b15ff62..a0a703d25f55782 100644 --- a/files/en-us/web/javascript/reference/global_objects/string/replaceall/index.md +++ b/files/en-us/web/javascript/reference/global_objects/string/replaceall/index.md @@ -116,6 +116,7 @@ This will work: ## See also - [Polyfill of `String.prototype.replaceAll` in `core-js`](https://github.com/zloirock/core-js#ecmascript-string-and-regexp) +- [es-shims polyfill of `String.prototype.replaceAll`](https://www.npmjs.com/package/string.prototype.replaceall) - [Regular expressions](/en-US/docs/Web/JavaScript/Guide/Regular_expressions) guide - {{jsxref("String.prototype.replace()")}} - {{jsxref("String.prototype.match()")}} diff --git a/files/en-us/web/javascript/reference/global_objects/string/small/index.md b/files/en-us/web/javascript/reference/global_objects/string/small/index.md index 0e4b628ecbc4fbf..facd385f969c2af 100644 --- a/files/en-us/web/javascript/reference/global_objects/string/small/index.md +++ b/files/en-us/web/javascript/reference/global_objects/string/small/index.md @@ -66,5 +66,6 @@ document.body.appendChild(elem); ## See also - [Polyfill of `String.prototype.small` in `core-js`](https://github.com/zloirock/core-js#ecmascript-string-and-regexp) +- [es-shims polyfill of `String.prototype.small`](https://www.npmjs.com/package/es-string-html-methods) - [HTML wrapper methods](/en-US/docs/Web/JavaScript/Reference/Global_Objects/String#html_wrapper_methods) - {{HTMLElement("small")}} diff --git a/files/en-us/web/javascript/reference/global_objects/string/split/index.md b/files/en-us/web/javascript/reference/global_objects/string/split/index.md index 7dde02f5b650157..c8000306ff08b8a 100644 --- a/files/en-us/web/javascript/reference/global_objects/string/split/index.md +++ b/files/en-us/web/javascript/reference/global_objects/string/split/index.md @@ -312,6 +312,7 @@ console.log(commands.split(splitCommands, 3)); // ["light on", "brightness up", ## See also - [Polyfill of `String.prototype.split` in `core-js` with fixes and implementation of modern behavior like `Symbol.split` support](https://github.com/zloirock/core-js#ecmascript-string-and-regexp) +- [es-shims polyfill of `String.prototype.split`](https://www.npmjs.com/package/string.prototype.split) - [Regular expressions](/en-US/docs/Web/JavaScript/Guide/Regular_expressions) guide - {{jsxref("String.prototype.charAt()")}} - {{jsxref("String.prototype.indexOf()")}} diff --git a/files/en-us/web/javascript/reference/global_objects/string/startswith/index.md b/files/en-us/web/javascript/reference/global_objects/string/startswith/index.md index 03c5496c28fd5a4..0e454b1aedf52b7 100644 --- a/files/en-us/web/javascript/reference/global_objects/string/startswith/index.md +++ b/files/en-us/web/javascript/reference/global_objects/string/startswith/index.md @@ -71,6 +71,7 @@ console.log(str.startsWith("not to be", 10)); // true ## See also - [Polyfill of `String.prototype.startsWith` in `core-js`](https://github.com/zloirock/core-js#ecmascript-string-and-regexp) +- [es-shims polyfill of `String.prototype.startsWith`](https://www.npmjs.com/package/string.prototype.startswith) - {{jsxref("String.prototype.endsWith()")}} - {{jsxref("String.prototype.includes()")}} - {{jsxref("String.prototype.indexOf()")}} diff --git a/files/en-us/web/javascript/reference/global_objects/string/strike/index.md b/files/en-us/web/javascript/reference/global_objects/string/strike/index.md index e0b5a39fad23ce7..2dc22507f424955 100644 --- a/files/en-us/web/javascript/reference/global_objects/string/strike/index.md +++ b/files/en-us/web/javascript/reference/global_objects/string/strike/index.md @@ -69,5 +69,6 @@ document.body.appendChild(elem); ## See also - [Polyfill of `String.prototype.strike` in `core-js`](https://github.com/zloirock/core-js#ecmascript-string-and-regexp) +- [es-shims polyfill of `String.prototype.strike`](https://www.npmjs.com/package/es-string-html-methods) - [HTML wrapper methods](/en-US/docs/Web/JavaScript/Reference/Global_Objects/String#html_wrapper_methods) - {{HTMLElement("strike")}} diff --git a/files/en-us/web/javascript/reference/global_objects/string/sub/index.md b/files/en-us/web/javascript/reference/global_objects/string/sub/index.md index 41add0d46924a38..80059b253cfec9c 100644 --- a/files/en-us/web/javascript/reference/global_objects/string/sub/index.md +++ b/files/en-us/web/javascript/reference/global_objects/string/sub/index.md @@ -66,5 +66,6 @@ document.body.appendChild(elem); ## See also - [Polyfill of `String.prototype.sub` in `core-js`](https://github.com/zloirock/core-js#ecmascript-string-and-regexp) +- [es-shims polyfill of `String.prototype.sub`](https://www.npmjs.com/package/es-string-html-methods) - [HTML wrapper methods](/en-US/docs/Web/JavaScript/Reference/Global_Objects/String#html_wrapper_methods) - {{HTMLElement("sub")}} diff --git a/files/en-us/web/javascript/reference/global_objects/string/substr/index.md b/files/en-us/web/javascript/reference/global_objects/string/substr/index.md index ecb5552f37f0005..b0ac52cb1441eb5 100644 --- a/files/en-us/web/javascript/reference/global_objects/string/substr/index.md +++ b/files/en-us/web/javascript/reference/global_objects/string/substr/index.md @@ -86,5 +86,6 @@ console.log(aString.substr(20, 2)); // '' ## See also - [Polyfill of `String.prototype.substr` in `core-js`](https://github.com/zloirock/core-js#ecmascript-string-and-regexp) +- [es-shims polyfill of `String.prototype.substr`](https://www.npmjs.com/package/string.prototype.substr) - {{jsxref("String.prototype.slice()")}} - {{jsxref("String.prototype.substring()")}} diff --git a/files/en-us/web/javascript/reference/global_objects/string/sup/index.md b/files/en-us/web/javascript/reference/global_objects/string/sup/index.md index 1f4c268986b3970..db663bb9278c1d6 100644 --- a/files/en-us/web/javascript/reference/global_objects/string/sup/index.md +++ b/files/en-us/web/javascript/reference/global_objects/string/sup/index.md @@ -66,5 +66,6 @@ document.body.appendChild(elem); ## See also - [Polyfill of `String.prototype.sup` in `core-js`](https://github.com/zloirock/core-js#ecmascript-string-and-regexp) +- [es-shims polyfill of `String.prototype.sup`](https://www.npmjs.com/package/es-string-html-methods) - [HTML wrapper methods](/en-US/docs/Web/JavaScript/Reference/Global_Objects/String#html_wrapper_methods) - {{HTMLElement("sup")}} diff --git a/files/en-us/web/javascript/reference/global_objects/string/towellformed/index.md b/files/en-us/web/javascript/reference/global_objects/string/towellformed/index.md index 506a7eb86b686c5..3f4feaf64208a65 100644 --- a/files/en-us/web/javascript/reference/global_objects/string/towellformed/index.md +++ b/files/en-us/web/javascript/reference/global_objects/string/towellformed/index.md @@ -87,5 +87,6 @@ console.log(encodeURI(illFormed.toWellFormed())); // "https://example.com/search ## See also - [Polyfill of `String.prototype.toWellFormed` in `core-js`](https://github.com/zloirock/core-js#well-formed-unicode-strings) +- [es-shims polyfill of `String.prototype.toWellFormed`](https://www.npmjs.com/package/string.prototype.towellformed) - {{jsxref("String.prototype.isWellFormed()")}} - {{jsxref("String.prototype.normalize()")}} diff --git a/files/en-us/web/javascript/reference/global_objects/string/trimend/index.md b/files/en-us/web/javascript/reference/global_objects/string/trimend/index.md index 23aac3e3e0945b0..60edd36cfc3e203 100644 --- a/files/en-us/web/javascript/reference/global_objects/string/trimend/index.md +++ b/files/en-us/web/javascript/reference/global_objects/string/trimend/index.md @@ -74,5 +74,6 @@ console.log(str); // ' foo' ## See also - [Polyfill of `String.prototype.trimEnd` in `core-js`](https://github.com/zloirock/core-js#ecmascript-string-and-regexp) +- [es-shims polyfill of `String.prototype.trimEnd`](https://www.npmjs.com/package/string.prototype.trimend) - {{jsxref("String.prototype.trim()")}} - {{jsxref("String.prototype.trimStart()")}} diff --git a/files/en-us/web/javascript/reference/global_objects/string/trimstart/index.md b/files/en-us/web/javascript/reference/global_objects/string/trimstart/index.md index 251fd0a13904b0d..45551bdb57432b5 100644 --- a/files/en-us/web/javascript/reference/global_objects/string/trimstart/index.md +++ b/files/en-us/web/javascript/reference/global_objects/string/trimstart/index.md @@ -74,5 +74,6 @@ console.log(str); // 'foo ' ## See also - [Polyfill of `String.prototype.trimStart` in `core-js`](https://github.com/zloirock/core-js#ecmascript-string-and-regexp) +- [es-shims polyfill of `String.prototype.trimStart`](https://www.npmjs.com/package/string.prototype.trimstart) - {{jsxref("String.prototype.trim()")}} - {{jsxref("String.prototype.trimEnd()")}} diff --git a/files/en-us/web/javascript/reference/global_objects/symbol/description/index.md b/files/en-us/web/javascript/reference/global_objects/symbol/description/index.md index afe4ebaeb4a34ce..759125fdfe91a68 100644 --- a/files/en-us/web/javascript/reference/global_objects/symbol/description/index.md +++ b/files/en-us/web/javascript/reference/global_objects/symbol/description/index.md @@ -59,4 +59,5 @@ Symbol.for("foo").description; // "foo" ## See also - [Polyfill of `Symbol.prototype.description` in `core-js`](https://github.com/zloirock/core-js#ecmascript-symbol) +- [es-shims polyfill of `Symbol.prototype.description`](https://www.npmjs.com/package/symbol.prototype.description) - {{jsxref("Symbol.prototype.toString()")}} diff --git a/files/en-us/web/javascript/reference/global_objects/symbol/matchall/index.md b/files/en-us/web/javascript/reference/global_objects/symbol/matchall/index.md index fcf277fec1f9a18..65d8310dd332f5f 100644 --- a/files/en-us/web/javascript/reference/global_objects/symbol/matchall/index.md +++ b/files/en-us/web/javascript/reference/global_objects/symbol/matchall/index.md @@ -56,6 +56,7 @@ console.log(Array.from(str.matchAll(numbers))); ## See also - [Polyfill of `Symbol.matchAll` in `core-js`](https://github.com/zloirock/core-js#ecmascript-symbol) +- [es-shims polyfill of `Symbol.matchAll`](https://www.npmjs.com/package/string.prototype.matchall) - {{jsxref("Symbol.match")}} - {{jsxref("Symbol.replace")}} - {{jsxref("Symbol.search")}} diff --git a/files/en-us/web/javascript/reference/global_objects/typedarray/at/index.md b/files/en-us/web/javascript/reference/global_objects/typedarray/at/index.md index d11191c8570fb78..55fdbc835dd3766 100644 --- a/files/en-us/web/javascript/reference/global_objects/typedarray/at/index.md +++ b/files/en-us/web/javascript/reference/global_objects/typedarray/at/index.md @@ -94,6 +94,7 @@ console.log(atWay); // 11 ## See also - [Polyfill of `TypedArray.prototype.at` in `core-js`](https://github.com/zloirock/core-js#relative-indexing-method) +- [es-shims polyfill of `TypedArray.prototype.at`](https://www.npmjs.com/package/typedarray.prototype.at) - [JavaScript typed arrays](/en-US/docs/Web/JavaScript/Guide/Typed_arrays) guide - {{jsxref("TypedArray")}} - {{jsxref("TypedArray.prototype.findIndex()")}} diff --git a/files/en-us/web/javascript/reference/global_objects/typedarray/slice/index.md b/files/en-us/web/javascript/reference/global_objects/typedarray/slice/index.md index 345928b964035be..33886584fd6c1ac 100644 --- a/files/en-us/web/javascript/reference/global_objects/typedarray/slice/index.md +++ b/files/en-us/web/javascript/reference/global_objects/typedarray/slice/index.md @@ -65,6 +65,7 @@ uint8.slice(0, 1); // Uint8Array [ 1 ] ## See also - [Polyfill of `TypedArray.prototype.slice` in `core-js`](https://github.com/zloirock/core-js#ecmascript-typed-arrays) +- [es-shims polyfill of `TypedArray.prototype.slice`](https://www.npmjs.com/package/typedarray.prototype.slice) - [JavaScript typed arrays](/en-US/docs/Web/JavaScript/Guide/Typed_arrays) guide - {{jsxref("TypedArray")}} - {{jsxref("Array.prototype.slice()")}} diff --git a/files/en-us/web/javascript/reference/global_objects/uint8array/frombase64/index.md b/files/en-us/web/javascript/reference/global_objects/uint8array/frombase64/index.md index d035a16c22b4da1..efa11eeb7674af2 100644 --- a/files/en-us/web/javascript/reference/global_objects/uint8array/frombase64/index.md +++ b/files/en-us/web/javascript/reference/global_objects/uint8array/frombase64/index.md @@ -147,6 +147,7 @@ const array5 = Uint8Array.fromBase64("PGI+ TURO PC9i P=", { ## See also - [Polyfill of `Uint8Array.fromBase64` in `core-js`](https://github.com/zloirock/core-js#uint8array-to--from-base64-and-hex) +- [es-shims polyfill of `Uint8Array.fromBase64`](https://www.npmjs.com/package/es-arraybuffer-base64) - {{jsxref("Uint8Array")}} - {{jsxref("Uint8Array.prototype.setFromBase64()")}} - {{jsxref("Uint8Array.prototype.toBase64()")}} diff --git a/files/en-us/web/javascript/reference/global_objects/uint8array/fromhex/index.md b/files/en-us/web/javascript/reference/global_objects/uint8array/fromhex/index.md index e74a7a99a3d0c45..7515a1cc54d99b6 100644 --- a/files/en-us/web/javascript/reference/global_objects/uint8array/fromhex/index.md +++ b/files/en-us/web/javascript/reference/global_objects/uint8array/fromhex/index.md @@ -69,6 +69,7 @@ console.log(bytes); // Uint8Array [ 202, 254, 208, 13 ] ## See also - [Polyfill of `Uint8Array.fromHex` in `core-js`](https://github.com/zloirock/core-js#uint8array-to--from-base64-and-hex) +- [es-shims polyfill of `Uint8Array.fromHex`](https://www.npmjs.com/package/es-arraybuffer-base64) - {{jsxref("Uint8Array")}} - {{jsxref("Uint8Array.prototype.setFromHex()")}} - {{jsxref("Uint8Array.prototype.toHex()")}} diff --git a/files/en-us/web/javascript/reference/global_objects/uint8array/setfrombase64/index.md b/files/en-us/web/javascript/reference/global_objects/uint8array/setfrombase64/index.md index c6e6c9b5d6b4d82..62e9488d4dd6329 100644 --- a/files/en-us/web/javascript/reference/global_objects/uint8array/setfrombase64/index.md +++ b/files/en-us/web/javascript/reference/global_objects/uint8array/setfrombase64/index.md @@ -133,7 +133,8 @@ console.log(decoder.decode("")); ## See also -- [Polyfill of `Uint8Array.setFromBase64` in `core-js`](https://github.com/zloirock/core-js#uint8array-to--from-base64-and-hex) +- [Polyfill of `Uint8Array.prototype.setFromBase64` in `core-js`](https://github.com/zloirock/core-js#uint8array-to--from-base64-and-hex) +- [es-shims polyfill of `Uint8Array.prototype.setFromBase64`](https://www.npmjs.com/package/es-arraybuffer-base64) - {{jsxref("Uint8Array")}} - {{jsxref("Uint8Array.fromBase64()")}} - {{jsxref("Uint8Array.prototype.toBase64()")}} diff --git a/files/en-us/web/javascript/reference/global_objects/uint8array/setfromhex/index.md b/files/en-us/web/javascript/reference/global_objects/uint8array/setfromhex/index.md index 2fa3fde5ae63c2f..6b73c3b4d31eeb1 100644 --- a/files/en-us/web/javascript/reference/global_objects/uint8array/setfromhex/index.md +++ b/files/en-us/web/javascript/reference/global_objects/uint8array/setfromhex/index.md @@ -94,7 +94,8 @@ console.log(uint8Array); ## See also -- [Polyfill of `Uint8Array.setFromHex` in `core-js`](https://github.com/zloirock/core-js#uint8array-to--from-base64-and-hex) +- [Polyfill of `Uint8Array.prototype.setFromHex` in `core-js`](https://github.com/zloirock/core-js#uint8array-to--from-base64-and-hex) +- [es-shims polyfill of `Uint8Array.prototype.setFromHex`](https://www.npmjs.com/package/es-arraybuffer-base64) - {{jsxref("Uint8Array")}} - {{jsxref("Uint8Array.fromHex()")}} - {{jsxref("Uint8Array.prototype.toHex()")}} diff --git a/files/en-us/web/javascript/reference/global_objects/uint8array/tobase64/index.md b/files/en-us/web/javascript/reference/global_objects/uint8array/tobase64/index.md index fdbcb3c216fc626..a15b74f7c96da8d 100644 --- a/files/en-us/web/javascript/reference/global_objects/uint8array/tobase64/index.md +++ b/files/en-us/web/javascript/reference/global_objects/uint8array/tobase64/index.md @@ -146,7 +146,8 @@ console.log(encoder.encode()); ## See also -- [Polyfill of `Uint8Array.toBase64` in `core-js`](https://github.com/zloirock/core-js#uint8array-to--from-base64-and-hex) +- [Polyfill of `Uint8Array.prototype.toBase64` in `core-js`](https://github.com/zloirock/core-js#uint8array-to--from-base64-and-hex) +- [es-shims polyfill of `Uint8Array.prototype.toBase64`](https://www.npmjs.com/package/es-arraybuffer-base64) - {{jsxref("Uint8Array")}} - {{jsxref("Uint8Array.fromBase64()")}} - {{jsxref("Uint8Array.prototype.setFromBase64()")}} diff --git a/files/en-us/web/javascript/reference/global_objects/uint8array/tohex/index.md b/files/en-us/web/javascript/reference/global_objects/uint8array/tohex/index.md index 18dbcaf67fd8f06..0934d6b7d4c9b51 100644 --- a/files/en-us/web/javascript/reference/global_objects/uint8array/tohex/index.md +++ b/files/en-us/web/javascript/reference/global_objects/uint8array/tohex/index.md @@ -54,7 +54,8 @@ for (let i = 0; i < data.length; i += 3) { ## See also -- [Polyfill of `Uint8Array.toHex` in `core-js`](https://github.com/zloirock/core-js#uint8array-to--from-base64-and-hex) +- [Polyfill of `Uint8Array.prototype.toHex` in `core-js`](https://github.com/zloirock/core-js#uint8array-to--from-base64-and-hex) +- [es-shims polyfill of `Uint8Array.prototype.toHex`](https://www.npmjs.com/package/es-arraybuffer-base64) - {{jsxref("Uint8Array")}} - {{jsxref("Uint8Array.fromHex()")}} - {{jsxref("Uint8Array.prototype.setFromHex()")}}