function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Pedro Garcia 26Pedro Garcia 26 

validate javascript library


I'm creating a Lightning component and use the Cytospace javascript library from
<ltng:require scripts="{!join(',', 
                $Resource.cytoscape + '/cytoscape.min.js', 
                $Resource.cytoscape + '/cytoscape.cjs.js')}"

I got the following error: Custom Script Eval error in 'ltng:require' [SecureDOMEvent: [object Event] {key: {namespace":"c"}}]

I just follow the SF documentation at

How could I validate if the Cytospace library can be used or not in Salesforce?

Anil Bolisetty 2Anil Bolisetty 2
could you check whether lightning locker service allows this js .
SwethaSwetha (Salesforce Developers) 
HI Pedro,
The best way to test a javascript library in the locker console is to copy the compiled javascript code file onto the console clicking evaluate (this will trigger locker to run evaluate on the code posted). You can then use the google console to see the error and the locker console will also display the output (including errors).

For more info see
Hope this helps you. Please mark this answer as best so that others facing the same issue will find this information useful. Thank you