Comments (3)
An alternative is to use electron instead of playwright
from plot.
Electron can't be called dynamically like that from node. But this works:
open -a "Google Chrome" --args --app="data:text/html,<html><body><script>window.moveTo(580,240);window.resizeTo(800,600)</script></body></html>"
or
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --app="data:text/html,<html><head><title>test</title></head><body><script>window.moveTo(580,240);window.resizeTo(800,600);window.open('https://localhost:3000');</script><h1>hi</h1></body></html>"
Trying to find a way to load these arguments correctly in a cross-platform way using the open library: sindresorhus/open#290
from plot.
Done. This still may be a little nicer using a custom electron app. It might be possible to install electron as a dep and trigger the internal app via custom protocol flag and load it via a url/ query param.
from plot.
Related Issues (10)
- Resize window to match chart size in `headless=false` mode HOT 1
- Add little more border on observable plots
- Stash the playwright context in a different folder HOT 1
- Vertically and horizontally center charts in window HOT 2
- Get chromium to not open a new window when you click the dock icon HOT 2
- New feature: Maybe compile a svelte app to get reactivity HOT 1
- Update playwright dependence HOT 1
- Should each call open a new Chromium instance?
- Use Electron instead of playwright
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from plot.