Javascript not working in chrome.window.create panel

725 views
Skip to first unread message

Ismail Pelaseyed

unread,
Dec 18, 2013, 8:44:27 AM12/18/13
to chromium-...@chromium.org
I have an external app which I'm trying to load into a chrome.window panel. Kind of like Google Hangouts Chrome extension.

Problem is that the panel doesn't run any of the javascript. If I change the type of the chrome.window to popup everything works fine.

What could be the problem?

Here is the code I run in my background.js:

chrome.windows.create({url: "https://myapp.com", type: 'panel'});
If I change this to:

chrome.windows.create({url: "https://myapp.com", type: 'popup'});

The javascript located at https://myapp.com works great but not when the type is set to panel.

And here is the code I'm running on mayapp.com:

<script src="//code.jquery.com/jquery-1.9.1.min.js"></script>
<script>
$(document).ready( function() {
   alert('Running jQuery...');
});
</script>

Ben Wells

unread,
Dec 18, 2013, 5:55:42 PM12/18/13
to Ismail Pelaseyed, Chromium-extensions
What kind of extension / app is it?

I'd say this is a CSP problem. If you package the code you want to run locally with your app / extension you should be fine.


--
You received this message because you are subscribed to the Google Groups "Chromium-extensions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-extens...@chromium.org.
To post to this group, send email to chromium-...@chromium.org.
Visit this group at http://groups.google.com/a/chromium.org/group/chromium-extensions/.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-extensions/8be4e3d5-efe5-46c2-8f7a-a6f82531f4be%40chromium.org.
For more options, visit https://groups.google.com/a/chromium.org/groups/opt_out.

Reply all
Reply to author
Forward
0 new messages