glued
glued

Reputation: 2629

Can you still create a Chrome packaged app in the browser with manifest 2.0?

All of the examples I've seen show apps launching in their own windows. This may be great an all for chromebook/chrome os, but is there still an option to launch in a browser tab?

Upvotes: 2

Views: 2217

Answers (2)

mangini
mangini

Reputation: 4259

No, there is no way to do that. Chrome Packaged Apps are not supposed to run inside a browser. You can, however, open URLs in a browser tab using window.open. But you won't have control of that tab after you issue the command.

If you need some sort of integration/control between your Chrome Packaged App and the browser, you can create an extension and make a communication pipe between the extension and the app - as long as both are running, using the chrome.runtime.sendMessage API.

See this sample for a simple code that does exactly that (two apps and one extension exchanging messages directly, without any server component).

Upvotes: 5

Sudarshan
Sudarshan

Reputation: 18534

chrome.app.window.create will create a new Window for an App.

If you want window manipulation, you should switch to chrome.tabs API and look for an extension instead of an App.

Reference

Upvotes: 1

Related Questions