Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Run modern code in an HTML Application

License

NotificationsYou must be signed in to change notification settings

joncasey/modern-hta

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

modern-hta bundles@babel/standalone and otherpolyfills to run modern code in anHTML Application (HTA).

Usage

Samplehta file usingcdn.

<metahttp-equiv="x-ua-compatible"content="ie=11"><scriptsrc="https://unpkg.com/modern-hta">import$from'./$.mjs'importdatafrom'./data.json'log(`Hello World`)</script>

Or,install and run locally.

Install

npm install modern-hta
<metahttp-equiv="x-ua-compatible"content="ie=11"><scriptsrc="node_modules/modern-hta/modern-hta.js">log(`Hello World`)</script>

What's Included...

Polyfills

Globals (to be continued...)

constBabel// export from@babel/standaloneconstscript// Element reference to the <script src=modern-hta>constcwd// current working directoryconstfso// instance of "Scripting.FileSystemObject"constsys// instance of "Wscript.Shell"constxhr// instance of "Msxml2.XMLHTTP"functioncreate(tag,html){// returns Element}functiongetSync(url){// returns xhr.responseText}functionlog(any){// returns HTMLDivElement}functionrequire(src){// returns ES Module}functiontransform(code,options){// runs Babel.transform w/presets "es2015", "es2016", "es2017", "stage-0"// which "stage-0" also includes "stage-1", "stage-2", "stage-3"// for my purposes this always runs synchronously// returns transpiledCode}functionwatchFile(file,onchange){// this intentionally is a quick/dirty-hack version// it runs a setTimeout and checks the last modified date// just wanted something super-simple & light-weight for now.// returns undefined}functionwindowProps(resize,moveto){// this just simplifies window resizeTo & moveTo calls// and, allows them to run as quickly as possible// returns undefined}

About

Run modern code in an HTML Application

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp