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

Plans for wider browser support #3

Closed
solkimicreb opened this issue Aug 28, 2016 · 3 comments
Closed

Plans for wider browser support #3

solkimicreb opened this issue Aug 28, 2016 · 3 comments

Comments

@solkimicreb
Copy link
Member

solkimicreb commented Aug 28, 2016

As you may know some browsers are not yet supported, because of the use of unpolyfillable ES6 Proxies in this helper library. This is a proposal to add a fallback for those browsers.

The NX core sets up hooks (middlewares) on DOM element attachments. Other then this it does a few other things, like transforming the state object into an observable object (this is where Proxies are used).

I plan to move everything other then the hook definitions out of the core into separate middlewares. I would move the code using the Proxy into a middleware called observe and create an alternative legacy-observe middleware that uses getters/setter instead of Proxies for data binding.

This way, the only thing you would have to do to achieve wider browser support is replacing comp.useOnContent(observe) with comp.useOnContent(legacyObserve) in the app component you use. The limitation of using legacyObserve would be not being able to bind on getters/setters and expando properties (this is a big one.) These limitations are present with all current data binding techniques that I know of others than the Proxy method.

What is your opinion, is it understandable?

@rockcoder23
Copy link

It sounds good~

@solkimicreb
Copy link
Member Author

All the preparations are ready. The core is now totally pure, it includes only DOM hooks and no observer logic. The legacyObserve middleware is scheduled after the beta release (which will happen on the first week of January).

@solkimicreb
Copy link
Member Author

I am closing this issue for now. I still plan to work on this, but it won't happen soon.

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

No branches or pull requests

2 participants