Q.tis – micro port of jQuery for Sciter.

I’ve published today Sciter 2.0.2.2 with q.tis – micro-port of essential jQuery features. Here is the list of supported functions. It is just enough to put include “t.tis”; in your code and any existing DOM function that returns array of elements will “automagically” produce the q-collection. In my implementation I am using the fact that…

Sciter 2.0.2.0 is out with new TIScript features

One of such features added in 2.0.2.0 is support of member variables declarations in classes. By using this var name = value construction you can define member (instance) variables: This code: class Foo { this var one = 1, // member variable two = 2; // member variable function sum() { return this.one + this.two;…

Making TIScript syntax compatible with CSS.

Time to time when I need to define some CSS constructs in script I feel myself non-comfortable – CSS and JavaScript/TIScript use different syntax’es. Consider this code in JavaScript: function switchState() { element.style.backgroundColor = “rgb(126,0,0)”; element.style.transform = “rotate(45deg) translate(10px,10px)”; } Not so aesthetically pleasing. And not so effective as string parsing is involved. And yet…

Use of CSS constants in script.

In Sciter you can define CSS constants using @const declarations like this: <style> @const TEST_STR:”test”; @const TEST_COLOR: rgb(128,0,0); @const TEST_NUMBER: 128; </style> and use them not only in CSS ( as @TEST_COLOR for example ) but also in script using accessor like this: var test_str = self.style.constant(“TEST_STR”); If you think that self.style.constant is too narrative…

What does “::” construction mean in TIScript?

Got this question in one of emails… One of forms to declare anonymous function in TIScript is so called single statement lambda function: ‘:’ [param-list] ‘:’ <statement>; Let’s say we have this JavaScript code: var counter = 0; var inc = function() { counter++; } So each time when you call inc() the counter will…

JavaScript vs Dart/Chrome vs TIScript/Sciter

Here is a comparison table of JavaScript/jQuery, Dart/GoogleChrome and TIScript/Sciter: www.terrainformatica.com/sciter/js-dart-tis.htm. It tries to compare similar features among these three technologies. My TIScript looks pretty good if you would ask me. Not that extreme as Dart and close to original JavaScript while bringing needed modularity and convenience. The document is based on synonym.dartlang.org , if…

The KiTE – template engine for JavaScript

Preface Modern Web applications frequently use AJAX kind of client/server interaction. They receive data from the server in pure JSON format. That means instead of generating markup on the server such applications are composing HTML inside the browser (on client side). Straightforward approach is to use string concatenation spagetti like : "<b>" + data +…

Behaviors, simple jQuery extension.

Behaviors as an entity is a declarative way to assign/bind scripting methods to DOM elements. We can think that browsers have following declarations in their default CSS declarations: input[type=text] { binding: TextEditorImpl; } input[type=button] { binding: ButtonImpl; } select { binding: SelectImpl; } … So when we define <input type="text" /> in our markup we…