Skip to content

Plans for wider browser support #3

@solkimicreb

Description

@solkimicreb

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?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions