The best way to make a standalone browser without chrome, nothing more

I am creating html autostart by loading it by default browser, you have a lot of problems, eliminating inconsistencies and more problems when loading Internet Explorer, for example, users must click the icon above when some javascript is loaded, etc. Which is the best solution for creating a small stand-alone application with full browser control in it, which will load an html file called index.html from the application path.

That is, if I have browser.exe in cd, it will load index.html from the cd directory. The browser must be based on webkit or Gecko. So far I have used xulrunner ... but its abundance, especially when the file to upload is only a few kilobytes. It uses many system resources.

I have experience with vb.net (but this requires .net framework) and php for windows. And basic python, c and javascript. Where should I start and what are your suggestions?

Update: It is assumed that this is a shell or browser without chrome that will load html. Thus, the only necessary functionality is autostart and html loading in full screen mode, that’s all! So air, .net etc will not do the job. It should be a separate exe.

+3
source share
1 answer

As no answer for this, I will post how you can use XULRunner for this purpose. Getting started, etc. Can be found here. I just put my layout code where I got the Chrome browser window, loads my specific page for autorun purposes.

<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<window id="main" title="Edusoft" hidechrome="true" sizemode="maximized" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">

<!--This Sets the browser control and loads index.html and sets clip menu as the popup menu -->
<browser id="1" type="content" src="chrome://myapp/content/theme1/index.html" flex="1" context="clipmenu"/>

<!-- Clips menu -->
<popupset>
  <menupopup id="clipmenu">
       <menuitem label="Go Back" oncommand="document.getElementById('1').goBack()"/>
       <menuseparator/>
       <menuitem label="About" oncommand="" />
       <menuseparator/>
       <menuitem label="Exit" oncommand="close();" />
  </menupopup>
</popupset>

</window>

This is the window that loads first when XULRunner starts. It is defined in. prefs.js It will be clear when you read it.

+5
source

Source: https://habr.com/ru/post/1758581/


All Articles