I'm getting a "sorry to interrupt" error modal when trying a custom component I'm building. The component doesn't even load (the specified action in the afterScriptsLoaded doesn't even run).

The message shows:

Custom Script Eval error [SecureDOMEvent: [object Event]{ key: {"namespace":"ltngtr"} }]

Where "ltngtr" is my org's namespace, of course.

The component's syntax is like this:

    <ltng:require scripts="{!$Resource.MyCustomLibraryJS}" afterScriptsLoaded="{!c.doInit}"/>

    <aura:attribute name="code" type="String" access="global"/>



I've tried adding the namespace to the JS file (like {!$Resource.ltngtr__MyCustomLibraryJS}), and it didn't change the results.

And my .app page is calling it like this:

<aura:application extends="force:slds">
    <ltngtr:MyComponent code="test"/>

"MyCustomLibraryJS" is a static resource JavaScript file of a custom JS library I'm using.


1 Answer 1


Its looks like an issue with your library. When you encounter errors related to the external libraries the first place to look for is checking your library against Locker console.

As a reference, here are some best practices around for creating custom js libraries with locker service compatibility. Sharing JavaScript Code Across Components

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .