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

Pending standards #11

Open
scottohara opened this issue Jan 13, 2011 · 10 comments
Open

Pending standards #11

scottohara opened this issue Jan 13, 2011 · 10 comments
Labels

Comments

@scottohara
Copy link
Owner

scottohara commented Jan 13, 2011

Browser Features

Feature Status Can I Use Source
navigator.connection.type (for auto-sync over wifi only) 👎 (Only in Chrome) Link Unofficial draft W3C proposal

Vendor prefixes

Feature Status Can I Use Spec
-webkit-user-select 👎 (Still prefixed on iOS) Link CSS4 working draft
-webkit-text-size-adjust ✋ (Still prefixed on iOS) Link Unofficial draft W3C proposal
-webkit-device-pixel-ratio 👍 resolution: 2dppx == -webkit-device-pixel-ratio: 2) Link CSS3
@scottohara
Copy link
Owner Author

In Safari 13 (iOS 13), -webkit-overflow-scrolling: touch will no longer be necessary.

We will be able to remove this from the ul, #dialog rule.

@scottohara
Copy link
Owner Author

Pointer events are now supported in iOS 13

@scottohara
Copy link
Owner Author

-webkit-overflow-scrolling: touch removed in 046a6f0

Although it was expected to be a no-op as of Safari 13, it still had the effect of creating a new CSS stacking context.

This started causing scrolling issues in iOS 13.4.x, where lists could not be scrolled without first rotating to landscape and back to portrait.

@scottohara
Copy link
Owner Author

Generating UUIDs in the browser (without a 3rd party dependency):
https://medium.com/teads-engineering/generating-uuids-at-scale-on-the-web-2877f529d2a2

Generating a 128-bit (16 bytes) random number with the Crypto API is as simple as:

crypto.getRandomValues(new Uint8Array(16))

To turn these random bytes into a RFC-compliant version 4 UUID, one needs to set the variant and version bits, and then convert the bytes to hexadecimal digits separated by dashes.

Another possibility is to use the File API in combination with the URL.createObjectURL function to obtain a Blob URL containing a UUID. Support for URL.createObjectURL is similar to Crypto at 99.9%.

const url = URL.createObjectURL(new Blob())
url.substring(url.lastIndexOf('/') + 1)

The File API does not specify which version of UUID should be used or how it should be generated. In practice, Chromium-based browsers (Chrome and Edge) and WebKit reuse their Crypto implementation to generate random bytes, and then set/clear bits to create a v4 UUID. Firefox calls OS-level functions when they exist (CoCreateGuid on Windows, CFUUIDCreate on macOS), and otherwise falls back to using Crypto like Chromium and WebKit.

Finally, browsers implement Crypto.getRandomValues by relying on the OS either to provide random numbers directly or to gather entropy and then regularly feed it to a PRNG, making it cryptographically secure (CSPRNG).

@scottohara
Copy link
Owner Author

scottohara commented Sep 11, 2021

https://developer.mozilla.org/en-US/docs/Web/API/Crypto/randomUUID

crypto.randomUUID()

Awaiting implementation in Safari

@scottohara
Copy link
Owner Author

-webkit-appearance is now unprefixed

@scottohara
Copy link
Owner Author

crypto.randomUUID() is now in Safari

@scottohara
Copy link
Owner Author

Badging API (experimental, in Safari 16.4)

https://developer.mozilla.org/en-US/docs/Web/API/Badging_API

@scottohara
Copy link
Owner Author

uuid.v4() has been replaced with crypto.randomUUID() in df65c63

@scottohara
Copy link
Owner Author

-webkit-device-pixel-ratio: 2 can now be replaced by either resolution: 2dppx or min-resolution: 2dppx in Safari 16.x

Need to check if there is any guidance on which to use for apple-touch-startup-image links.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant