-
Notifications
You must be signed in to change notification settings - Fork 477
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
The variable font code uses Proxy, a non-polyfillable ES6 type. #716
Comments
There's |
We can use it if we directly add support for the polyfill into our code, but it's not a true polyfill for it, it's more like a workaround. The only way to truly polyfill it is the non-standard and deprecated Object.observe(). |
Mhh, what is a "true" polyfill for you? |
A polyfill is a piece of code that replicates the functionality of a feature using other older features. In this case, the chrome polyfill doesn't work in all cases.
|
We could use it though, it's just we have to be careful about the traps used, and how we use it. |
Is this backward compatibility really necessary? Nowadays users need to have a relativly recent browser due to security dangers anyway. If polyfilling is possible without much effort I'm all to it, if it put additional constraints on development I'd give it a no to waste time and effort on it. |
A lot of smart TVs and other embedded browsers use old versions of chromium and webkit. For compatability with such devices this is needed. |
The variable font code uses Proxy, a non-polyfillable ES6 type, preventing opentype.js from being transpiled to anything lower than ES6.
Expected Behavior
In order to implement a legacy/compatibility build this code must be reworked slightly to remove the dependence on Proxy.
Current Behavior
While most JavaScript features can be polyfilled for older browsers, proxy is one of the few that cannot. Even SWC and Closure Compiler cannot polyfill this feature.
Possible Solution
Don't use Proxy, it doesn't add any significant amount of code to avoid it.
Context
This is blocking #693
The text was updated successfully, but these errors were encountered: