question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Using Plotly with Salesforce (strict mode now enforced)

See original GitHub issue

Hello!

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:open
  • Created 7 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
etpinardcommented, Jul 4, 2016

Is there a v2.0.0 branch that is at any level of stability? I’d be happy to help test it when that effort gets underway.

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.

1reaction
xmascommented, Jul 4, 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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

JavaScript Strict Mode Enforcement - Salesforce Developers
In JavaScript, strict mode is enforced in modules but optional in regular programs. However, Lightning Locker implicitly enables JavaScript strict mode ...
Read more >
Strict mode enforcement in Locker Service - O'Reilly
Strict mode enforcement in Locker Service Locker Service automatically enforces ES5 strict mode for the JavaScript. If you write JavaScript that is not ......
Read more >
Interactive Salesforce Graphing in Python using plotly
please not down these two parameters to authenticate plotly from python. apiplotly.png. Python Script. Now for the fun bit first up we need...
Read more >
Untitled
Leg in a cast, Fal 16, Jasmina lozar x factor, Cargo ship crash in italy, ... Carlos ramirez centeno esperare, Now it's your...
Read more >
sitemap-questions-94.xml - Stack Overflow
... .com/questions/86181/how-do-i-enforce-data-integrity-rules-in-my-database ... -syntaxerror-in-strict-mode-code-functions-can-only-be-declared-at-top ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found