-
Notifications
You must be signed in to change notification settings - Fork 12
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
Risks of premature polyfilling #12
Comments
I'm not sure exactly what you're asking here. In general, web platform APIs---including layered APIs---cannot change in backward-incompatible ways. Also, I'd be surprised if a web developer chose to put a polyfill after the I'm also unclear on what you mean by a policy for updating polyfill. The web developer controls the URLs after the Can you explain the risk more clearly? |
I think the risk exists if someone was to create a speculative polyfill and the standards body later decided to make changes to the API. The risk is avoided if the standard simply defers giving it a name until the API is finalized. |
I think this is a real risk, but I'm not sure what we can do about it. Conceptually, it's not different from a developer feature detecting today and loading a speculative polyfill though, so hopefully it won't be too much worse of a problem than we have today. |
The idea of not giving a LAPI a standardized name until the API is shipped in at least one browser, to avoid developers "squatting" on it in an incompatible way, is an interesting one. |
Hah...that's clever. Somehow I missed that suggestion. That's hard to do I think? But if we could do it would be great. |
Yeah, I mean it's not really hard to guess that the identifier for a project named async local storage is going to be something like "async-local-storage". But maybe just having the spec say "IDENTIFIER NOT RELEASED YET" and all the examples say e.g. "std:als-identifier-tb" or similar would nudge things in the right direction... |
We should try it! Worst case is that it doesn't work and we stop doing it in the future. Probably worth putting this in the LAPIs explainer if we do. |
"std:als|polyfill.js" works fine only if both API are same. if not, browser update will break the application. if you think "polyfill is only a polyfill, we can't go forward without backward-incompatible, currently same things happens, as is in rapis" that's ok. |
in this case, browser shipping std:async-local-storage which is different api from fallback js polyfill,
will seems break application.
(details are in https://w3ctag.github.io/polyfills/#risks-of-premature-polyfilling as premature polyfill).
it's seems better for lapis to have some policy for updating polyfill for avoiding case with hard to change api because of old-api-polyfill.
or is there any way to avoid this risk ?
The text was updated successfully, but these errors were encountered: