This fixes all the license headers in the main library, which corrects
the appearance of the main license in the compiled output.
It seems that the `!` in the header forces the compiler to keep it in
the output. I believe older compiler releases did this purely based
on `@license`.
Issue #2638
Change-Id: I7f0e918caad10c9af689c9d07672b7fe9be7b2f3
@exportInterface is used by the extern generator, but ignored by the
compiler. @export should be used for shaka.polyfill.
Closes#2549 .
Change-Id: I400db152ec8ca222a45a598ab58ddfbe44552443
This fixes several inter-related issues:
1. Catch errors in polyfill installation so that test setup isn't
interrupted half-way through
2. Use the compiled polyfill in tests, fixing polyfill installation
error during tests on IE
3. Require at least version 1.0.2 of the polyfill, since 1.0.0 had
bugs in the module export and 1.0.1 had an infinite recursion bug
Change-Id: I38c973152409d9b3168e70e82f20579566663208
The generated externs did not include shaka.polyfill because we used
the wrong annotation on the class. This fixes it.
Raised in PR #1273
Change-Id: I348064a117a7e1878b439ad8bd1ce49df56bfd39
This reflects changes in Google's policy on JavaScript license
headers, which should be smaller to avoid increasing the size of the
binary unnecessarily.
This also updates the company name from "Google, Inc" to "Google LLC".
Change-Id: I3f8b9ed3700b6351f43173d50c94d35c333e82b4
Now each EME polyfill can be removed independently; this allows
someone to remove just the IE11 polyfill while still keeping the
others.
This adds a priority ordering to the polyfills so the nop polyfill
will be run last as a fallback if there are no other polyfills.
Issue #1261
Change-Id: I865e1c0d6a73a079dd91505e96572e215e6f6c6a
This is part of a change to convert all usages of 'var' with either
'let' or 'const'. This takes a conservative approach for 'const' where
it will only be used for aliases and storing the "original" values in
tests.
Change-Id: I6a329d28e13a81c9f7136737518c6bb8fa18402e
- IE did not get forEach until IE 9, so it can't be used in
polyfill.installAll().
- Object.keys, console, and console.log.bind may all be unavailable
on older browsers, so skip initialization of on-screen logging in
the demo app if they are missing. The support test will fail
anyway.
- 'catch' is a reserved word on older browsers, so use the two-arg
version of then() to catch promise failures.
With these fixes, the support test can again be used on old browsers,
and the compiled-mode demo app can report an error back to IE 6.
Change-Id: I3019468f24a510a265ad5b13df4f01cd1bb1f34d
This changes namespace exports to the more targetted exportDoc,
adds exports where they are needed and removes them where they are
not. Exporting of Uint8Array and String utils should be re-evaluated
later.
Change-Id: I9298e73a0a5ef026b6f2b1854488d2c359be10c1
This will help with porting to IE11. Chrome, Firefox, Safari, and
Edge all have native Promises.
This polyfill does not support thenables because Shaka does not use
them. Other than tests related to thenables, this polyfill passes
the A+ test suite.
It is also worth noting that this polyfill is incompatible with
native Promises, so it should not be used to replace a native
implementation or mixed with browser APIs that may use a native
implementation internally.
To safely test in Chrome, force prefixed EME (to avoid native
Promises), set window.Promise to null, then load some content in
the test app. If using a verison of Chrome after prefixed EME
was dropped, use unencrypted content.
To run the A+ test suite, compile the library, install nodejs and the
module 'promises-aplus-tests', then run ./test_promise_polyfill.js.
Inspired by pull #176
Change-Id: I0d25049f162ff7f3b57bbc795403fcdedf927262
* Updates all Copyright years to 2015.
* Adds licenses annotations to all JS.
* Makes all licenses identical to avoid repeated appearance in the
compiled output.
* Drops fileoverview annotations, which do not affect docs output.
* The linter still requires fileoverview on externs.
This patch required a newer closure compiler, since the previous
version we used had a bug regarding license annotations that caused
the license comment block to appear in the output once per file
regardless of uniqueness.
Change-Id: I2e9272db680cba7ecc4613d97f1d3a94ac2244cc
This reverts commit 8cb24652cb, due to
the fact that the new annotations caused our binary size to jump
by 52%.
The compiler preserves all 'unique' licenses, which causes trouble
since the comment blocks with the license annotations are not unique
and contain file overview comments as well.
We can re-examine this once we have restructured the license headers.
Change-Id: I418e407a0e0253630633697f30cf496a7fc2ddfc