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

IE 11 support? #326

Open
Jcomper opened this issue Apr 9, 2020 · 9 comments
Open

IE 11 support? #326

Jcomper opened this issue Apr 9, 2020 · 9 comments

Comments

@Jcomper
Copy link

Jcomper commented Apr 9, 2020

IE 11 is not supported as far as I can tell.
Dependency jexl is using ES6 class syntax, after transpiling it to ES5 I faced a problem that Proxy object is used in formproperty.ts

set properties(properties: FormProperty[] | { [key: string]: FormProperty }) {
    /**
     * Override the setter to add an observer that notices when an item is added or removed.
     */
    this._properties = new Proxy(properties, this._propertyProxyHandler);
  }

and there is no Proxy Polyfill for IE11.

Any thoughts on this?

@ebrehault
Copy link
Collaborator

Sorry, but currently, we have no plan about IE11 support.
Of course, if you come up with a pull request providing IE11 support and not impacting negatively the current implementation, we would definitely merge it.

@akshaygolash
Copy link

@Jcomper - Are you planning yo create PR ? My angular app also does not compile in IE 11 because of JEXL not providing es5 transpiled code.

@daniele-pecora
Copy link
Collaborator

daniele-pecora commented Jun 15, 2020

Jexl ES5 support pull request is already there:
TomFrost/Jexl#57

A Proxy polyfill is also provided by Google:
https://github.com/GoogleChrome/proxy-polyfill
The traps provided by this polyfill are sufficient.

@daniele-pecora
Copy link
Collaborator

daniele-pecora commented Sep 15, 2020

Jexl ES5 support pull request has been merged and released as version 2.3.0
https://github.com/TomFrost/Jexl#57
TomFrost/Jexl#87

@Jcomper, @akshaygolash

To build for IE11

  1. install the latest version of Jexl
    npm install [email protected]
  2. install the latest version of the Proxy-Polyfill
    npm install [email protected]

your are ready to go

@daniele-pecora daniele-pecora added the solved An issue that is solved (Not always a bug per se) label Sep 15, 2020
@rodrigo-vizbelis
Copy link

Hi @daniele-pecora . I tried your suggested solution but it doesn't work with latest [email protected] and also [email protected]

IE11 error messages:

  • version 2.5.7: "Proxy polyfill does not support trap 'logger'"
  • version 2.5.0: "Proxy polyfill does not support trap 'deleteProperty'"

@daniele-pecora
Copy link
Collaborator

Hi @rodrigo-vizbelis could you try this version I build here:
ngx-schema-form-2.5.7-beta.1.tgz.zip

Just extract the ZIP file somewhere and install via path like
$ npm install ./myfolder/ngx-schema-form-2.5.7-beta.1.tgz

@rodrigo-vizbelis
Copy link

rodrigo-vizbelis commented Oct 1, 2020

@daniele-pecora ExtendedProxyHandler changes solves issue about proxy polyfill unsupported traps. Here is a stack trace from new IE11 issue:

stack: "TypeError: Cannot create property for a non-extensible object
   at createProperties (http://localhost:4200/vendor.js:167489:11)
   at ObjectProperty (http://localhost:4200/vendor.js:167447:5)
   at PROPERTY_TYPE_MAPPING.object (http://localhost:4200/vendor.js:167538:3)
   at createProperty (http://localhost:4200/vendor.js:165679:13)
   at ngOnChanges (http://localhost:4200/vendor.js:166820:9)
   at rememberChangeHistoryAndInvokeOnChangesHook (http://localhost:4200/vendor.js:36929:5)
   at callHook (http://localhost:4200/vendor.js:38024:5)
   at callHooks (http://localhost:4200/vendor.js:37981:9)
   at executeInitAndCheckHooks (http://localhost:4200/vendor.js:37919:5)
   at selectIndexInternal (http://localhost:4200/vendor.js:41849:9)"
   }

Error comes from ObjectProperty class line 55:

this.properties[propertyId] = this.formPropertyFactory.createProperty(propertySchema, this, propertyId);

It seems that this issue is related to proxy polyfill because i can't reproduce it after removing Proxy object usage from FormProperty class.

@daniele-pecora
Copy link
Collaborator

daniele-pecora commented Oct 1, 2020

@rodrigo-vizbelis

The GoogleChrome/proxy-polyfill does make the wrapped object immutable by calling Object.seal(...) on them.
That is why adding new properties wont work here.

As I see there is another proxy polyfill out there: es6-proxy-polyfill which does not seal the target and proxied objects.

Would you like try it out?

@erlioniel
Copy link

erlioniel commented Oct 20, 2020

@daniele-pecora I think the label on the issue is misleading. Maybe remove it?

I was trying to play with polyfills, but didn't manage to make it working. So rolled back to 2.3.2 :(

@daniele-pecora daniele-pecora removed the solved An issue that is solved (Not always a bug per se) label Oct 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants