Closed JamieDixon closed 8 years ago
Yes, I am aware of this issue but even we do not state use strict
explicitly, es6 module code is always in strict mode.
Module code is always strict mode code.
http://www.ecma-international.org/ecma-262/6.0/#sec-strict-mode-code
Is there a known solution to this?
Can you show me a fiddle of how the error is produced ?
I was under the impression that use strict
and es6 modules "always in strict mode" would yield the same behaviour. Perhaps this isn't what is causing the issue with accessing this.document
?
I was having problems getting any React charting wrapper to work (rd3, chart.js) so in the end I'm just using the core lib in React and wrapping it in my own component. I'll see if I can put together a fiddle of the issue when time permits. Feel free to close this issue if you think it's not relevant to rd3 and thanks for taking the time to reply and for maintaining this repo!
I'll see if I can put together a fiddle of the issue when time permits
Cool ! Thanks for reporting.
I'm currently receiving this error in D3 so this might not be a rd3 specific issue but I want to make you aware of the problem incase there's a solution that I've missed.
The problem seems to be that D3 uses
var d3_document = this.document;
.According to this issue D3 doesn't support being used anywhere with
use strict
.Since this is the case, it looks like a D3 issue rather than an rd3 issue however I'm curious to understand how anyone using ReactJS is therefore getting this to work. Almost every ReactJS project I've seen (or worked on) is compiled with
use strict
as the default. Is there a known solution to this?Thanks for maintaining rd3, I'm very much appreciative of the time and effort you've put into this OSS project.