Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add randomUUID polyfill #3669

Merged
merged 3 commits into from
Sep 29, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Add comment
  • Loading branch information
Alvaro Velad committed Sep 29, 2021

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit ebf8909d75f82c8280506b5c4fc7fa7093484c67
1 change: 1 addition & 0 deletions lib/polyfill/random_uuid.js
Original file line number Diff line number Diff line change
@@ -21,6 +21,7 @@ shaka.polyfill.RandomUUID = class {
shaka.log.debug('randomUUID.install');

if (!window.crypto) {
// See: https://caniuse.com/cryptography
shaka.log.debug(
'window.crypto must be available to install randomUUID polyfill.');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had to look up support for WebCrypto to realize that it goes back to Chrome 11 / Firefox 26 / IE 11. Can you please add a comment so that some well-meaning person doesn't assume that this is a problem when reading this code in the future?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A link to https://caniuse.com/cryptography is enough?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

return;