-
Notifications
You must be signed in to change notification settings - Fork 2
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
Extend browser support. #1
Comments
@dbuenzli a slightly different approach in https://github.com/apatil/ocaml-webview should be cross-platform, at least in theory. Would that address the use case for which you wrote this library, or do you need a full-featured browser with forward and back buttons etc.? |
No. I want that to open/reload in the user's browser. |
Got it. |
I think this approach should be used. |
That doesn't allow you to reload arbitrary pages. You need to have the script on your page. |
Right. You have to send a local page with the script |
I suppose something similar is possible for other browsers. |
Generating the page wrapper also allows us to programmatically choose the port (since it must be in the web page) and also have a single websocket server for several URL (each page connecting to a different path on websocket server) that could automatically die if there are no connections for a given time from both applications and web pages. |
I forgot to point to the Firefox documentation. |
I suppose JS could also reload the whole page using |
I'm not sure exactly how it can achieve what it's doing now (which is to reload any tab you might have in your browser) also TBH that feels like killing a fly with an atomic bomb. |
It can't reload any tab (because that requires browser scripting which does not seem to be readily available — short of writing a browser plugin) but it can reload tabs that were opened through the library, which is usually what one wants (it's not bad not to touch existing tabs).
I agree and there may be other solutions but, in the absence of browser scripting, I guess they will involve JS talking to a small local server — maybe one can use a simpler one than a websocket. |
Note that livereload uses the above technology to reload tabs when the underlying file is updated, so I'm not very confident there is a much simpler solution... |
For now the full browser reload strategy is only supported on osx with chrome and safari. Help for extending support along the documentation is welcome.
xdg-open
The text was updated successfully, but these errors were encountered: