 <p>Try putting the js in a separate file, and then:</p> <pre><code>var MeteoPanel = require("panel").Panel({ width:740, height:350, contentURL: data.url("test.html"), contentScriptFile: data.url("yourJSFile.js"), //Add this line allow:true }); </code></pre> <p>Seems like <code>contentScriptFile</code> accepts an array too, so you could change its value to <code>[data.url("file1.js"),data.url("file2.js")]</code> if you need for instance to add 2 source files.</p>