Skip to content
This repository was archived by the owner on Feb 26, 2024. It is now read-only.

add specs for FileReader#136

Closed
robwormald wants to merge 5 commits intoangular:masterfrom
robwormald:bug/FileReader
Closed

add specs for FileReader#136
robwormald wants to merge 5 commits intoangular:masterfrom
robwormald:bug/FileReader

Conversation

@robwormald
Copy link
Copy Markdown
Contributor

from angular/angular#2533

this adds two specs, one using addEventListener that works, the other using the reader.onloadend event that fails with The zone [1] is not a direct child of the zone [4] - i cribbed this from the similar XHR spec, so apologies if my logic is wrong here.

see also plunker demo http://plnkr.co/edit/glcsfUFJo8RlE1sn55Cr?p=preview

i'm gonna have a crack at fixing this next, but wanted to get this in in case its something stupid i'm missing.

Review on Reviewable

@robwormald
Copy link
Copy Markdown
Contributor Author

so the simple fix works for chrome and firefox, but borks on Safari and IE.

I referenced the hilarity going on in the websocket patch, and had a crack at fixing that - the latest commit fixes the zone issue (and a bunch of formatting, sorry) but isn't quite right as it loses the constants and readyState seems to drop out as well. I started going around in circles, so perhaps somebody else could have a look.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant