mirror of
https://github.com/shaka-project/shaka-player.git
synced 2026-06-14 15:56:38 +03:00
70e370c7eb
Also: - removes outdated isBrowserSupported() check for Node.children - adds mention of polyfill.installAll() to polyfill tutorial Closes #66 Change-Id: I8a633858d2536ecf6110aac1326f58c17ccc5672
49 lines
1.6 KiB
HTML
49 lines
1.6 KiB
HTML
<!--
|
|
Copyright 2014 Google Inc.
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
you may not use this file except in compliance with the License.
|
|
You may obtain a copy of the License at
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
See the License for the specific language governing permissions and
|
|
limitations under the License.
|
|
-->
|
|
|
|
<h3 class="tutorial-heading">
|
|
Polyfills
|
|
</h3>
|
|
|
|
<p>
|
|
A {@link https://remysharp.com/2010/10/08/what-is-a-polyfill polyfill} is a bit
|
|
of code that fills in missing APIs or normalizes variations in APIs. A polyfill
|
|
allows other pieces of code to expect a single API from the underlying browser.
|
|
</p>
|
|
|
|
<p>
|
|
The Shaka Player uses polyfills to modify, rename, or replace various pieces of
|
|
browser functionality. Before instantiating the Player, these polyfills should
|
|
be installed into the JavaScript environment.
|
|
</p>
|
|
|
|
<p>
|
|
Each polyfill has its own class and a static install() method. We suggest that
|
|
you install all polyfills, since the install method will intelligently detect a
|
|
browser's capabilities and only patch APIs which need patching. The recommended
|
|
method is {@link shaka.polyfill.installAll}.
|
|
</p>
|
|
|
|
<p>
|
|
Once browsers commonly implement the necessary functionality consistently, some
|
|
polyfills can be removed to reduce the size of the JavaScript code.
|
|
</p>
|
|
|
|
<p>
|
|
For detailed information on our polyfills, please see: {@link shaka.polyfill}
|
|
</p>
|
|
|