Using Plotly with Salesforce (strict mode now enforced)
See original GitHub issueHello!
I’m super excited that Plotly is now open source, and I’m hoping to use it with an app I’m developing on the Salesforce platform.
Salesforce has recently put in place a new policy for 3rd party Javascript libraries: https://developer.salesforce.com/blogs/developer-relations/2016/04/introducing-lockerservice-lightning-components.html
Amongst other things, “strict
” is on be default, and there are numerous areas where Plotly is failing.
I’ve just started looking through the errors and found a few things like:
<<<12586
var d3_document = this.document;
>>>
var d3_document = document;
<<< 13741
var d3_mouse_bug44083 = this.navigator && /WebKit/.test(this.navigator.userAgent) ? -1 : 0;
>>>
var d3_mouse_bug44083 = navigator && /WebKit/.test(navigator.userAgent) ? -1 : 0;
I’m not sure if the roadmap for Plot.ly includes support for moving to ES6 (where strict
is on be default), or if Plotly is using the D3.v4 (which I believe is ES6 compatible…).
If it’s not, then I will look into seeing how many changes and where need to happen to get Plotly running again on Salesforce.
Thanks!
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (3 by maintainers)
Top GitHub Comments
Not at the moment, unfortunately. I’ll comment on this thread once a
v2.0.0
branch is up. That will probably have to wait for September 2016.The specific Salesforce enforcement officially takes effect in October, so I might be able to stay on current versions. That is excellent advice though, so I will see if I can track it down.