Good day everyone!
I develop a Google Chrome Extension. The architecture is mainly built on using content script in Chrome tab and separate master window for providing basic management and user-oriented information. Extension should provide a good-user-experience and for that I have an appropriate list of criteria:
- Creating master window in specified width & height, top & left. In some cases creating modal window.
- Draw attention or focus to the master window for interacting with user.
- Unresizable.
- Zoomable by mouse wheel or buttons.
- Toggle Always-on-Top.
Additional criteria. Extension should work properly out of box. Any tricky additional settings aren't satisfying for end users. Extension should work properly in Chromium-like browsers.
The current state of my Extension is that I use the Chrome Extension API's chrome.windows for creating (1) and focusing (2) to the master window, and chrome.tabs for zoom operations (4).
I know there is a limitation of using unresizable Chrome windows (3). Looks like it's a dead end.
My implementation of Always-on-Top feature (5) documented in chrome.windows is not working. Here's code I use:
chrome.windows.getCurrent({ windowTypes: ['panel'] }, function(window) {
chrome.windows.update(window.id, { focused: true }, function(w) {
w.alwaysOnTop = true;
});
});
The console.log says that w.alwaysOnTop is toggled from false to true, but there's no changes, and next call do the same. The accepted answer here Chrome extension pop up windows always on top says about Chrome flags, etc, which is not suitable for end users.
I have some information about chrome.app.window, it provides good features. But it seems that the developers will remove support for Chrome Apps. In this article Transitioning from Chrome Apps is highly recommend to use chrome.windows instead, but again not a word about support for (3) and (5).
Using the Window.open() don't make any effect in Chrome Dev 82.0.4056.3. It just do the same as Chrome.windows do. And something tells me that this is not quite a cross-browser solution.
On my opinion, the Electron BrowserWindow can do the best with above list of criteria. I know for that Electron combines Chromium and Node.js. But I can't find any more detailed documentation or appropriate examples about this topic.
Also last days I look a bit quickly on React and Angular opportunities. Seems like Angular is more suitable for Google. I'm total new to that frameworks.
So, here I am. Any help or clues on this topic will be very helpful for my purpose. Thanks in advance!