hulufei / electron-as-browser Goto Github PK
View Code? Open in Web Editor NEWMake electron like browser easy and flexible.
License: MIT License
Make electron like browser easy and flexible.
License: MIT License
Pretty simple request: add .d.ts files for all the .js files.
how to make build of electron APP
Browser view is deprecated, it is superceded by https://www.electronjs.org/docs/latest/api/web-contents-view
It's not clear to me why for new Tab
:
sandbox: true
https://github.com/hulufei/electron-as-browser/blob/master/index.js#L390
but for controlView
contextIsolation : false,
nodeIntegraion: true
https://github.com/hulufei/electron-as-browser/blob/master/index.js#L80
Is it enough secure?
A very cool project, and i found
there is a strange case when i ran project with a simple main page just like this below:
<div><button id="b2" > test2 </button></div>
<script>
b2 = document.getElementById("b2")
b2.addEventListener("click",
(event) => {
alert('b2')
window.open('https://www.google.com', 'bbbddd');
},
false,
)
</script>
First when i clicked the button 'test2' to open a new Google tab-page, it worked;
then i closed this new-opend page by clicking the 'x' on the tab card;
so that i switched to the original simple main page;
and next, i clicked the button 'test2' again to open a new Google tab-page, BUT it can't work.
As I repeated these steps with the simple page on Chrome browser, it work well.
i found it would worked as long as using un-uniqe value on the second parm of func 'window.open' like
window.open('https://www.google.com', 'bbbddd'+new Date().getTime());
Can u help this out?
Hey ,
I'm trying to recreate a similar experiment from scratch by putting two BrowserViews.
However, once I add the second browser view - the first browser view goes unresponsive - but is still in the background. I am not sure how to focus it back when I click on it.
Have you run into this? I feel like I might be missing a flag maybe.
Setting debug to false in order to prevent the dev tools window from popping up results in getting a blank page.
Is there a way to disable the dev tools window popping up?
I am also getting the following errors upon start in the console:
(node:517563) UnhandledPromiseRejectionWarning: Error: An object could not be cloned.
at EventEmitter.t.ipcRendererInternal.send (node:electron/js2c/renderer_init:85:328)
at EventEmitter.<anonymous> (node:electron/js2c/renderer_init:81:357)
(Use `electron --trace-warnings ...` to show where the warning was created)
(node:517563) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
Hi,
I've tried to run this module under electron version 25, but it doesn't work. Is it possible to update it with the latest version of electron? Thank you.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.