So I know that 'Chrome Packaged App' will run in a window, I have tried to run the website I want in a <webiview> tag but it gets stuck at the beginning and I can't find a way to debug what's happenning inside that <webview> tag.
I now have tried to change the manifest to work as a 'Chrome Hosted App' but it keeps opening in a tab.
How do I start my app in a window, either by having it as a chrome hosted app?
Or by <webview> (if I find a way to debug it)?
As pointed here, a Chrome Hosted app can be open in a specific window if you enable this flag:
Enables the web app style frame for hosted apps
in chrome://flags.
Chrome's built-in developer tools can be used to debug packaged apps, extensions and webview as well as web pages (Right-click on any page element in webview and select Inspect Element).
Related
Is it possible to have a webview application for a web page and load extensions in the application?
I have created a frameless wrapper for one of our web pages, so we can hide the chrome header. I am also using the stylebot extension to alter some elements in the page. It works fine inside chrome, but when I run the application the stylebot extension is not loaded.
Any idea how can I add the extension to the application?
Greatly appreciate your help on this
Thanks, Laszlo
A Google chrome extension have to be load in Google Chrome (or Chromium based browsers). The Google chrome extension API is not included in the webview engine.
You can open a frameless window with create method of the Google window API. You should add an handler to browser action click and create a window of with "popup" type and the url you want. It's not exactly what you are looking for but I don't know a better way to do it on Mac. Perhaps some one more familliar with that environement could help you.
An other far more complicated solution is to fork the Crhomium project and do what you want. But it demand a large developpement I think.
Just like Android has a webview inside which a webpage can be opened, is it possible to do the same using chrome packaged app?
To give an example, how about opening a youtube link inside a chrome packaged app and then playing around with its DOM elements and adding more functionality to it using the app?
You have to use webviews (like with Android) and then play with executeScript and insertCSS.
If you want a full example, I made a Chrome Packaged App for Google Play Music in 2013 (it could be deprecated) and the code is available on GitHub.
I want to create an app and that opens only on new window.
This tells that we cannot open tab by a chrome apps. But when I access
this gmail app, and this kind of apps opens in the same tab.
How can I get this resolved.
It seems that you are confusing Chrome Hosted Apps with Chrome Apps.
Hosted apps are more or less bookmarks. Chrome Apps are similar to native apps in that they are much more powerful but have no special access to the browser. You can open normal web content using window.open(). But you can't put your own Chrome App content inside that tab.
Is there any way to embed "console" tab from chrome web inspector in a page?
Unfortunately I do not know of a way to do this in a normal web page in any browser but you could make an Electron app and perhaps show the inspector whenever you want for the user.
If you are looking to embed a JS console emulator on your site, perhaps to show off raw JavaScript, you can use YourJS Console. It also gives you the ability to initialize the console with custom code or a GitHub Gist.
I would like to add the possibility to a simple Chrome web app, to use the Chrome Omnibox. The app should just be an icon on the start-page of chrome and add Omnibox functionality.
Adding the attribute "omnibox": { "keyword" : "x" } to my manifest.json brings up the message
Feature 'omnibox' is not accessible. Not allowed for specified package type (theme, app, etc.).
Is it possible to enable this functionality or can I develop an extension which behaves exactly like an Chrome web app, so I could use the omnibox inside that extension?
Thanks for your advise.
If you're making a Hosted App, you are very limited in what you can access. I believe a Hosted App can only perform actions that a normal HTML5 web page could (with a few narrow exceptions, like long-running background pages). If you want to include omnibox functionality, you'll have to make it a Packaged App -- but it could be a Packaged App that opens your web page like your current app and includes omnibox support, since the functionality of Packaged Apps is a superset of Hosted Apps functionality.