powerchrome

2025-12-10 0 112

PowerChrome for HTML/JavaScript Application

PowerChrome is a portable chromium-base web browser to enable fast and easy development
of desktop applications using HTML and JavaScript.

With PowerChrome, you can quickly and easily write and run your own desktop applications,
providing a seamless user experience for your users.

Motivation

HTML is great for UI, and JavaScript is awesome for coding. However, developing web-base program
for desktop is somehow frustrated experience as web browser revoke all accessibility of local
resources. End-user will not understand why your program cannot access printer, open a file,
run another program or access database. You are hacking problems with hands and legs tied up.

I had longed for a web browser which has DB connectivity and OS accessibility, so that can
coding JavaScript/HTML/CSS application like Electron. so thankful that have chance to make one.

JavaScript Interface

PowerChrome provides a natural approach to HTML and JavaScript application development.
It enables HTML pages to access the window shell, file system, and database, and provides
additional application services by PowerChrome JavaScript Interface in sync mode.

For example,

  • Call notepad.exe: pb.run(\'notepad.exe\')
  • Execute a file: pb.shell(\'calc.exe\')
  • Copy a file: pb.fileCopy(sourceFile, targetFile)
  • Connect to Oracle database: pb.dbConnect(\'O90\', dbParm, dbServer, logID, logPass)
  • Run SQL query (in sync mode): rsStr = pb.dbQuery(\'select * from tablename\')
  • Run SQL and convert results to JSON: rs = JSON.parse(pb.dbQuery(sql))
  • Get HTML source (in sync mode): rs = pb.httpSource(\'https://hacker-news.fireba*se**io.com/v0/item/160705.json\')
  • Popup an HTML dialog: pb.popup(\'sample-dialog.html\', {width: 1024, height: 700})

Features

  • Portable – no installation required
  • Chromium-based – can use Chrome/Chromium for testing and debugging
  • HTML as the application format and JavaScript ES6 for programming
  • API runs in sync mode – no callback or promise objects
  • Simple console support
  • Cloud-app enabled
  • Run on Windows 7/8/10/11

Get Started

Download and Run

  1. Download powerchrome-0.62-with-runtime.zip and unzip the all-in-one package.
  2. Run powerchrome.exe.
  3. powerchrome.html will be loaded to demonstrate how PowerChrome works with an HTML desktop application.

Application Startup

PowerChrome loads the startup page using the following sequence:

  1. Commandline options: /app={startup.html}
  2. INI config in the [system] section: start={startup.html}
  3. index.html
  4. powerchrome.html

After the page is loaded, powerchrome.js will be imported to initialize the interface,
then call the JavaScript function onPageLoaded().

To start coding, simply create an index.html file and write your code in any text editor.

Files & Deployment

The following files are included in the downloaded package
powerchrome-0.62-with-runtime.zip

File Name Deploy Description
powerchrome.exe yes PowerChrome program
powerchrome.js yes JavaScript interface
powerchrome.ini no INI config file (optional, recommended for development only)
powerchrome.html no Default HTML program. it is API quick reference
powerchrome.pbl no Source code of Powerbuilder (2019R3)
sample*.* no Sample files (HTML and MS Access Database)
*.dll yes Powerbuilder-Runtime Libraries
.\\pbcef yes chromium (cef)

PowerChrome is a single execution file (powerchrome.exe), only powerchrome.exe, powerchrome.js
and Powerbuilder-Runtime are required. The other files are optional or depends on usage.

Command-line Options

powerchrome.exe /app={startup.html} /fullscreen /script={interface.js} /save={name.html} /save={name.pdf} /select={selector}

  • specify application startup page by /app={startup.html} or /url={startup.html}
  • open application in fullscreen by /fullscreen or /kiosk
  • use customized interface script by /script={interface.js}
  • crawl page by css-selector, and save to HTML file /url={link} /save={name.html} /css=selector
  • print page to PDF file /url={link} /save={name.pdf}

Cloud Mode and Security

PowerChrome will run in cloud-mode when the startup link start with https:// or http://.

In cloud mode, PowerChrome-JavaScript-Interface is available for the URL in SAME DOMAIN.

for example, run chromechrome.exe for web-application:

powerchrome.exe /app=https://casualwriter.g*i*t*hub.io/powerchrome/powerchrome.html

API will only available for URL start with https://casualwriter.g*i**thub.io/powerchrome/.
If navigate to another domain, PowerChrome works like normal chromium browser.

Documenation

still working on Documentation at https://casualwriter.gi*t**hub.io/powerchrome

  • Document Home
  • Getting Started
  • Interface (API)
  • Development Guide

History

  • 2022/12/01, release version v0.56
  • 2022/12/09, release v0.60, implement security for cloud mode.
  • 2023/01/10, v0.62, bug fixed. update documents

下载源码

通过命令行克隆项目:

git clone https://github.com/casualwriter/powerchrome.git

收藏 (0) 打赏

感谢您的支持,我会继续努力的!

打开微信/支付宝扫一扫,即可进行扫码打赏哦,分享从这里开始,精彩与您同在
点赞 (0)

申明:本文由第三方发布,内容仅代表作者观点,与本网站无关。对本文以及其中全部或者部分内容的真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。本网发布或转载文章出于传递更多信息之目的,并不意味着赞同其观点或证实其描述,也不代表本网对其真实性负责。

左子网 编程相关 powerchrome https://www.zuozi.net/33470.html

opencred
上一篇: opencred
MicrosoftAccess
下一篇: MicrosoftAccess
常见问题
  • 1、自动:拍下后,点击(下载)链接即可下载;2、手动:拍下后,联系卖家发放即可或者联系官方找开发者发货。
查看详情
  • 1、源码默认交易周期:手动发货商品为1-3天,并且用户付款金额将会进入平台担保直到交易完成或者3-7天即可发放,如遇纠纷无限期延长收款金额直至纠纷解决或者退款!;
查看详情
  • 1、描述:源码描述(含标题)与实际源码不一致的(例:货不对板); 2、演示:有演示站时,与实际源码小于95%一致的(但描述中有”不保证完全一样、有变化的可能性”类似显著声明的除外); 3、发货:不发货可无理由退款; 4、安装:免费提供安装服务的源码但卖家不履行的; 5、收费:价格虚标,额外收取其他费用的(但描述中有显著声明或双方交易前有商定的除外); 6、其他:如质量方面的硬性常规问题BUG等。 注:经核实符合上述任一,均支持退款,但卖家予以积极解决问题则除外。
查看详情
  • 1、左子会对双方交易的过程及交易商品的快照进行永久存档,以确保交易的真实、有效、安全! 2、左子无法对如“永久包更新”、“永久技术支持”等类似交易之后的商家承诺做担保,请买家自行鉴别; 3、在源码同时有网站演示与图片演示,且站演与图演不一致时,默认按图演作为纠纷评判依据(特别声明或有商定除外); 4、在没有”无任何正当退款依据”的前提下,商品写有”一旦售出,概不支持退款”等类似的声明,视为无效声明; 5、在未拍下前,双方在QQ上所商定的交易内容,亦可成为纠纷评判依据(商定与描述冲突时,商定为准); 6、因聊天记录可作为纠纷评判依据,故双方联系时,只与对方在左子上所留的QQ、手机号沟通,以防对方不承认自我承诺。 7、虽然交易产生纠纷的几率很小,但一定要保留如聊天记录、手机短信等这样的重要信息,以防产生纠纷时便于左子介入快速处理。
查看详情

相关文章

猜你喜欢
发表评论
暂无评论
官方客服团队

为您解决烦忧 - 24小时在线 专业服务