Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support new format data:text/html #208

Open
g8up opened this issue Dec 14, 2020 · 5 comments
Open

support new format data:text/html #208

g8up opened this issue Dec 14, 2020 · 5 comments

Comments

@g8up
Copy link

g8up commented Dec 14, 2020

data:text/html;charset=utf-8,${html} can be render by chrome.
maybe it can be supported.

eg.

"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --args --new-window --app="data:text/html,<h1>Hello</h1>"

@mmahalwy
Copy link

Any update on this?

@g8up
Copy link
Author

g8up commented Jul 3, 2021

As I delete the quotes in --app, and test it under Win10 64bit, It works!😀

const open = require('open');

open('', {app: {name: 'chrome', arguments: ['--new-window', `--app=data:text/html,<h1>Hello</h1>`]}})

@mmahalwy

@g8up g8up closed this as completed Jul 3, 2021
g8up added a commit to g8up/open that referenced this issue Jul 3, 2021
@g8up g8up reopened this Jul 4, 2021
@mmahalwy
Copy link

mmahalwy commented Jul 7, 2021

oh nice @g8up ! Love it!

@fritx
Copy link

fritx commented Sep 28, 2022

Can't find a solution for MacOS

@olalonde
Copy link

I wrote an alternative solution here which creates a temporary file before calling open(): https://github.com/olalonde/open-html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants