Reputation: 44852
How would I open a local html file that is located within a chrome.windows.create
? also, is it possible to make the chrome.windows.create
non scrollable, no toolbars, etc?
Upvotes: 7
Views: 20810
Reputation: 1671
The question includes an "etc." that might mean you want no title bar for the window. If so, the answer is that it cannot be done. According to https://developer.chrome.com/extensions/windows#method-create, there is no way to eliminate the title bar (probably to prevent phishing and other fraud). This was not the answer I wanted, since I wanted to write an extension to display a tiny digital clock, but I think it is true: a tiny popup digital clock extension is impossible. An attempt to set an option called "frame" to "none" only generates an error message.
Upvotes: 0
Reputation: 111285
What about:
chrome.windows.create({url: "local.html", type: "popup"});
I think it should understand local path, if not then:
chrome.windows.create({url: chrome.extension.getURL("local.html"), type: "popup"});
Upvotes: 21