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

FileReader not working #34

Open
makua-bernal opened this issue Oct 11, 2017 · 3 comments
Open

FileReader not working #34

makua-bernal opened this issue Oct 11, 2017 · 3 comments

Comments

@makua-bernal
Copy link

makua-bernal commented Oct 11, 2017

fileReader = new FileReader() doesn't appear to be working, although new File() works, is this intended? It appears to be implemented in jsdom according to the version 7 changelog.

@modosc
Copy link

modosc commented Oct 19, 2017

i setup a fork here:

https://github.com/modosc/global-jsdom

it reads all the dom keys in directly from the jsdom object so as long as you're using a recent enough version of jsdom this will work:

> $ node
> new FileReader()
ReferenceError: FileReader is not defined
    at repl:1:1
    at ContextifyScript.Script.runInThisContext (vm.js:50:33)
    at REPLServer.defaultEval (repl.js:239:29)
    at bound (domain.js:301:14)
    at REPLServer.runBound [as eval] (domain.js:314:12)
    at REPLServer.onLine (repl.js:440:10)
    at emitOne (events.js:120:20)
    at REPLServer.emit (events.js:210:7)
    at REPLServer.Interface._onLine (readline.js:282:10)
    at REPLServer.Interface._line (readline.js:631:8)
> require('global-jsdom')()
[Function: cleanup]
> new FileReader()
FileReader {}

@tenkiller
Copy link

@modosc Could you submit this as a PR rather than forking it? Is jsdom-global not being maintained anymore?

@modosc
Copy link

modosc commented Apr 5, 2018

this repo appears abandoned - it's been almost a year since any code activity. if you want to make a pr out of those changes feel free to.

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

3 participants