ElectronJS alternative: SciterJS – HTML/CSS/JS in 4.5 MB executable

ElectronJS alternative: SciterJS – HTML/CSS/JS in 4.5 MB executable

Sciter.JS – Sciter but with QuickJS on board instead of my TIScript

Script

Sciter.JS uses QuickJS

  • ES6: async/await, classes, modules, destructuring;
  • BigInt, BigFloat, BigDecimal – arbitrary precision IEEE 754 floating point operations and transcendental functions with exact rounding (currency, etc);
  • Node.JS runtime (more or less full) is coming;

Platforms

  • Windows – i32, i64 and arm64 – published;
  • MacOS – i64 and arm64 – pending;
  • Linux – i64, arm32, arm64 – pending;
  • Mobiles – pending;

Demo

Browser and Sciter

Browser and Sciter shows the same HTML document.

To run demo start run-calculator-browser.bat or run-calculator-sciter.bat. The later will start bin.win/x32/scapp.exe – standalone Sciter engine.

DOM and Runtime status

Implemented so far (list will be extended):

Document

Properties:

  • document.body
  • document.head
  • document.documentElement

Methods:

  • document.querySelector()
  • document.querySelectorAll()
  • document.getElementById()

Element extends Node

Properties:

  • element.className
  • element.id
  • element.tagName
  • element.innerHTML
  • element.outerHTML
  • element.innerText
  • element.nextElementSibling
  • element.previousElementSibling
  • element.value

Methods:

  • element.appendChild(node)
  • element.insertBefore(node, refNode)
  • element.insertAfter(node, refNode)
  • element.removeChild(node)
  • element.replaceChild(newNode,oldNode)
  • element.insertAdjacentHTML(where, html)
  • element.querySelector(selector)
  • element.querySelectorAll(selector)
  • element.addEventListener(…)

Node

Properties:

  • node.nodeName
  • node.nodeType
  • node.nodeValue
  • node.firstChild
  • node.lastChild
  • node.nextSibling
  • node.previousSibling
  • node.ownerDocument
  • node.parentNode
  • node.parentElement
  • node.textContent

Methods:

  • node.cloneNode()
  • node.contains()
  • node.compareDocumentPosition() – not yet
  • node.getRootNode()
  • node.hasChildNodes()
  • node.isEqualNode()
  • node.isSameNode()

Event

properties:

  • event.bubbles
  • event.cancelable
  • event.currentTarget
  • event.defaultPrevented
  • event.eventPhase
  • event.target
  • event.type

methods:

  • event.preventDefault()
  • event.stopImmediatePropagation()
  • event.stopPropagation()

global methods

  • console.log()
  • setTimeout(func,milliseconds)
  • clearTimeout(tid)
  • setInterval(func,milliseconds)
  • clearInterval(iid)

Window

There is no concept of Window in browser sense. Window there is quite strange entity that has no relation with desktop windows.

Instead Sciter.JS will offer Sciter.window object that represents current desktop window with these properties and attributes

  import {window} from 'Sciter'; // current window
  window.move(10,10,800,600);

XL subscribe to our newsletter banner

Get the latest news and advice on COVID-19, direct from the experts in your inbox. Join hundreds of thousands who trust experts by subscribing to our newsletter.

Send your news and stories to us news@climaxradio.co.uk or newstories@climaxnewsroom.com and WhatsApp: +447747873668.

Before you go...

Democratic norms are being stress-tested all over the world, and the past few years have thrown up all kinds of questions we didn't know needed clarifying – how long is too long for a parliamentary prorogation? How far should politicians be allowed to intervene in court cases? To monitor these issues as closely as we have in the past we need your support, so please consider donating to The Climax News Room.

0 0 vote
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments