<commit_before># Polyfills

`<model-viewer>` relies on standardized features of the Web Platform to do a lot
of what it does. Some of these features are very new and don't exist in all
browsers yet. In order to maximize browser compatibility, you should install
[polyfills](https://en.wikipedia.org/wiki/Polyfill_(programming)) to fill in the
gaps for some of the newest features.

---

 - ✅ Natively supported
 - ✋ Available with polyfill
 - 🚧 Behind a flag, unstable
 - 🚫 Not available

Feature                   | Chrome | Canary | Safari 12 | Firefox 65 | Edge | IE 11
--------------------------|--------|--------|-----------|------------|------|------
Custom Elements           |     ✅ |     ✅ |        ✅ |         ✅ |   ✋ |   ✋
Shadow DOM                |     ✅ |     ✅ |        ✅ |         ✅ |   ✋ |   ✋
Resize Observer¹          |     ✅ |     ✅ |        ✋ |         ✋ |   ✋ |   ✋
Intersection Observer²    |     ✅ |     ✅ |        ✋ |         ✅ |   ✅ |   ✋


The following features are only required if you wish to use the unstable
in-browser WebXR augmented reality mode via the `unstable-webxr` attribute:


Feature                   | Chrome | Canary | Safari 12 | Firefox 65 | Edge | IE 11
--------------------------|--------|--------|-----------|------------|------|------
Fullscreen API³           |     ✅ |     ✅ |        ✋ |         ✅ |   ✋ |   ✋
WebXR Device API          |     🚫 |     🚧 |        🚫 |         🚫 |   🚫 |   🚫
WebXR HitTest API         |     🚫 |     🚧 |        🚫 |         🚫 |   🚫 |   🚫


_1: Resize Observer is optional. [See below](https://github.com/PolymerLabs/model-viewer/blob/master/POLYFILLS.md#regarding-resize-observer) for more details_

_2: Intersection Observer is optional. [See below](https://github.com/PolymerLabs/model-viewer/blob/master/POLYFILLS.md#regarding-intersection-observer) for more details_

_3: Fullscreen API is only needed when using unstable WebXR features. [See below](https://github.com/PolymerLabs/model-viewer/blob/master/POLYFILLS.md#regarding-fullscreen-api) for more details_

### Regarding IE 11

We currently test and support Internet Explorer 11. We also distribute a special
["legacy" bundle](https://unpkg.com/@google/model-viewer/dist/model-viewer-legacy.js)
that is compatible with IE 11 but comes with the following important caveat:
the "legacy" bundle includes JavaScript language feature polyfills and code
transformations that will incur a byte size and execution time penalty
compared to the non-legacy versions of the code.

## Browser Support

The following emerging standard web platform APIs are *required* by
`<model-viewer>`:

 - [Custom Elements](https://html.spec.whatwg.org/multipage/custom-elements.html#custom-elements) ([CanIUse](https://caniuse.com/#feat=custom-elementsv1), [Platform Status](https://www.chromestatus.com/features/4696261944934400))
 - [Shadow DOM](https://dom.spec.whatwg.org/#shadow-trees) ([CanIUse](https://caniuse.com/#feat=shadowdomv1), [Platform Status](https://www.chromestatus.com/features/4667415417847808))

The following emerging web platform APIs are *optional*, and will be used by
`<model-viewer>` if they are detected on the page:<commit_msg>Further revise polyfill table<commit_after># Polyfills

`<model-viewer>` relies on standardized features of the Web Platform to do a lot
of what it does. Some of these features are very new and don't exist in all
browsers yet. In order to maximize browser compatibility, you should install
[polyfills](https://en.wikipedia.org/wiki/Polyfill_(programming)) to fill in the
gaps for some of the newest features.

---

 - ✅ Natively supported
 - ✋ Available with polyfill
 - 🚧 Behind a flag, unstable
 - 🚫 Not available

These browser features are **required** for `<model-viewer>` to work correctly:

Feature                    | Chrome | Canary | Safari 12 | Firefox 65 | Edge | IE 11
---------------------------|--------|--------|-----------|------------|------|------
Custom Elements            |     ✅ |     ✅ |        ✅ |         ✅ |   ✋ |   ✋
Shadow DOM                 |     ✅ |     ✅ |        ✅ |         ✅ |   ✋ |   ✋

These browser features are **optional** and are only used if available for
performance optimization:

Feature                    | Chrome | Canary | Safari 12 | Firefox 65 | Edge | IE 11
---------------------------|--------|--------|-----------|------------|------|------
Resize Observer[¹](1)      |     ✅ |     ✅ |        ✋ |         ✋ |   ✋ |   ✋
Intersection Observer[²](2)|     ✅ |     ✅ |        ✋ |         ✅ |   ✅ |   ✋

These browser features are **optional** and are only needed if you wish to use
the `unstable-webxr` feature:

Feature                    | Chrome | Canary | Safari 12 | Firefox 65 | Edge | IE 11
---------------------------|--------|--------|-----------|------------|------|------
Fullscreen API[³](3)       |     ✅ |     ✅ |        ✋ |         ✅ |   ✋ |   ✋
WebXR Device API           |     🚫 |     🚧 |        🚫 |         🚫 |   🚫 |   🚫
WebXR HitTest API          |     🚫 |     🚧 |        🚫 |         🚫 |   🚫 |   🚫


[1]: https://github.com/PolymerLabs/model-viewer/blob/master/POLYFILLS.md#regarding-resize-observer
[2]: https://github.com/PolymerLabs/model-viewer/blob/master/POLYFILLS.md#regarding-intersection-observer
[3]: https://github.com/PolymerLabs/model-viewer/blob/master/POLYFILLS.md#regarding-fullscreen-api

### Regarding IE 11

We currently test and support Internet Explorer 11. We also distribute a special
["legacy" bundle](https://unpkg.com/@google/model-viewer/dist/model-viewer-legacy.js)
that is compatible with IE 11 but comes with the following important caveat:
the "legacy" bundle includes JavaScript language feature polyfills and code
transformations that will incur a byte size and execution time penalty
compared to the non-legacy versions of the code.

## Browser Support

The following emerging standard web platform APIs are *required* by
`<model-viewer>`:

 - [Custom Elements](https://html.spec.whatwg.org/multipage/custom-elements.html#custom-elements) ([CanIUse](https://caniuse.com/#feat=custom-elementsv1), [Platform Status](https://www.chromestatus.com/features/4696261944934400))
 - [Shadow DOM](https://dom.spec.whatwg.org/#shadow-trees) ([CanIUse](https://caniuse.com/#feat=shadowdomv1), [Platform Status](https://www.chromestatus.com/features/4667415417847808))

The following emerging web platform APIs are *optional*, and will be used by
`<model-viewer>` if they are detected on the page:
{'fraction_non_alphanumeric': 0.17076946895804304, 'fraction_numerical': 0.018423904629199565, 'mean_word_length': 2.2187344294967613, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 10, 'https://': 22, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 10, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '856203', 'n_tokens_mistral': 2114, 'n_tokens_neox': 1969, 'n_words': 619}