Skip to content
This repository was archived by the owner on Jul 11, 2018. It is now read-only.
This repository was archived by the owner on Jul 11, 2018. It is now read-only.

question: Order of polyfills.js #126

@joewoodhouse

Description

@joewoodhouse

The background to this question comes from danielsogl/awesome-cordova-plugins#505

Basically it appears there's an issue with how the FileReader API is patched by various agents, namely Zone.js, Ionic Native and the Cordova file plugin itself. The resulting behaviour made events like onloadend and similar not reliably fire from the FileReader. It pointed to a Zone.js related issue.

After a bit of exploring and experimenting I found that by moving the polyfills.js script tag to the top of my index.html, before the cordova.js tag, the issue went away. Presumably this is because polyfills.js contains zone.js in it, and so by this re-ordering somehow the issue is resolved.

It would be good to know if this is a safe thing to do. Presumably there was a reason why the polyfills.js was put after cordova.js originally.

Any information much appreciated.

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