jamen / browser-window Goto Github PK
View Code? Open in Web Editor NEWA helpful `BrowserWindow` wrapper.
License: MIT License
A helpful `BrowserWindow` wrapper.
License: MIT License
Instead of the long autoHideMenuBar
, just a meunbar
that defaults to true. e.g. menubar: false
to disable
An option that automatically does this
browser.frameless({ graceful: true })
Would be nice if there was a to trigger window.load
's callback through IPC.
I envision something like this:
var window = browser()
window.load('./source.html', function () {
// Trigger this manually in source
})
var me = require('browser-window/child')()
setTimeout(function () {
me.ready()
}, 100)
With our window.load
, you can make Electron apps without creating HTML and CSS files:
var APP_ENTRY = path.resolve('./app/index.js')
window.load(`<html><body><script>require('${APP_ENTRY}')</script></body>`, { type: 'text/html' })
It would be cool if there was a way to bootstrap JS files even easier.
window.load(`${__dirname}/foo.txt`)
// Should be equivalent to
window.load(`file://${__dirname}/foo.txt`)
I want to use it with jamen/path-template
:
window.load(path`${__dirname}/views/app.html`)
I would likewin.on(evt, fn)
and win.send(evt, ...params)
to operate on top of uuid
or unique-string
(maybe win.native.id
?) to have the events be per-window.
For example, win.on('foo', ...)
becomes 241$foo
or 4427b402-9921-4a03-ac2d-6841dcfbf2aa$foo
It would be cool to have something like this:
var window = browser.transparent({
devTools: process.env.APP_ENV === 'dev'
// ...
})
To have dev tools open automatically:
APP_ENV=dev electron .
It could be supplied true
/false
, or openDevTools
's mode
options. e.g.:
var window = browser({ devTools: 'undocked' })
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.