You need to sign in to do that
Don't have an account?
Pedro Garcia 26
validate javascript library
Hi...
I'm creating a Lightning component and use the Cytospace javascript library from https://cytoscape.org/
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 https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/js_libs_platform.htm
How could I validate if the Cytospace library can be used or not in Salesforce?
Thanks
I'm creating a Lightning component and use the Cytospace javascript library from https://cytoscape.org/
<ltng:require scripts="{!join(',', $Resource.cytoscape + '/cytoscape.min.js', $Resource.cytoscape + '/cytoscape.cjs.js')}" afterScriptsLoaded="{!c.setup}"/>
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 https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/js_libs_platform.htm
How could I validate if the Cytospace library can be used or not in Salesforce?
Thanks
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 https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/security_locker_console_evaluate.htm