EmptyFlow.SciterAPI 1.2.8

dotnet add package EmptyFlow.SciterAPI --version 1.2.8
                    
NuGet\Install-Package EmptyFlow.SciterAPI -Version 1.2.8
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="EmptyFlow.SciterAPI" Version="1.2.8" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="EmptyFlow.SciterAPI" Version="1.2.8" />
                    
Directory.Packages.props
<PackageReference Include="EmptyFlow.SciterAPI" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add EmptyFlow.SciterAPI --version 1.2.8
                    
#r "nuget: EmptyFlow.SciterAPI, 1.2.8"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package EmptyFlow.SciterAPI@1.2.8
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=EmptyFlow.SciterAPI&version=1.2.8
                    
Install as a Cake Addin
#tool nuget:?package=EmptyFlow.SciterAPI&version=1.2.8
                    
Install as a Cake Tool

nugeticon docslink CI and Tests nugeticon

SciterAPI

C# cross platform binding and low-level helpers for Sciter HTML/CSS/JS rendering library. You can check out more about Sciter here. Library support net8+, also trimming and compilation to NativeAot. Supported Sciter from version 6.0.0.0+ (also known as SciterJS). Package is production ready.

Install instruction

Install-Package EmptyFlow.SciterAPI

To download sciter you need to open gitlab

Important! Don't forget to select specific build and debug architecture, Any CPU is not allowed in this case. Also you need to select the corresponding sciter library, and it should be of the same architecture as in your project (if you select x64, it means you need to load sciter library from x64 folder).

Getting started

using EmptyFlow.SciterAPI;

var sciterFolder = Environment.CurrentDirectory; // you need specify folder where will be located sciter library file (sciter.dll/libsciter.so/libsciter.dylib)
var host = new SciterAPIHost ( sciterFolder ); // create host and load API
host.EnableDebugMode(); // enable debug mode
host.EnableFeatures(); // enable all feature by default, or you can pass you set via parameter
host.CreateWindow ( asMain: true ); // create window (asMain mean pointer will be store in host.MainWindow property, instead you need to store it youself via returned variable)
host.AddWindowEventHandler ( new SciterEventHandler ( host.MainWindow, host ) ); // create and register window Event Handler (via event handler you can handle events from windows or elements)
host.LoadFile ( "file://path/my.html" ); // load HTML page, path specified in first argument
host.Process (); // start sciter and run main loop for show main window

public class MyWindowEventHandler : SciterEventHandler {

    public MyWindowEventHandler ( SciterAPIHost host ) : base ( host.MainWindow, host, SciterEventHandlerMode.Window ) { // define event handler with mode Window (which mean events will be handled from all elements on page)
    }

    public override void BehaviourEvent ( BehaviourEvents cmd, nint heTarget, nint he, nint reason, SciterValue data, string name ) { // handle behaviour events
        if ( cmd == BehaviourEvents.DOCUMENT_READY ) { // if document become ready, which mean it fully loaded
            var appDiv = Host.MakeCssSelector ( "#app" ).First (); // find tag with attribute id=app
            Host.SetElementHtml ( appDiv, "<b>Bold Text!!!!!!!!!!!!!!</b>", SetElementHtml.SIH_REPLACE_CONTENT ); // change html in these tag
        }
    }
}

Documentation

Latest version documentation can be found there.

Table compatibility

In most cases, the old SciterAPI will be compatible with the new Sciter, but the new version of SciterAPI may not be compatible with old Sciter version. You can check the table below to see which version of SciterAPI is compatible with Sciter.

Minimal SciterAPI version Minimal Sciter version
1.0.4 6.0.1.8
1.0.0 6.0.0.0

Production Ready and Current Progress

SciterAPI from version 1.2.7 can be used in production ready environment. Most of the library APIs have reached their final form, if something will be changes in future it will be introduced as new APIs. Some of parts in progress:

  • Graphics API implemented on 45%
  • Request API not implemented (will be after Graphics API)

Some of parts not planned:

  • Archive API, I don't think it required when .NET have it own way to store files inside Assemblies.
  • SOM API, not sure I can do binding for SOM, I really try but no luck, instead I suggest PseudoSOM it analog of SOM but based on EventHandler.
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net10.0

    • No dependencies.
  • net8.0

    • No dependencies.
  • net9.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.2.8 82 5/4/2026
1.2.7 97 4/23/2026
1.2.6 108 3/29/2026
1.2.5 124 3/21/2026
1.2.4 105 3/4/2026
1.2.3 107 2/23/2026
1.2.2 122 1/15/2026
1.2.1 123 1/3/2026
1.2.0 287 12/17/2025
1.1.0 251 11/28/2025
1.0.11 224 10/15/2025
1.0.10 323 7/20/2025
1.0.9 220 7/14/2025
1.0.8 222 7/8/2025
1.0.7 215 6/29/2025
1.0.6 331 6/7/2025
1.0.5 140 6/7/2025
1.0.4 242 6/2/2025
1.0.3 264 5/6/2025
1.0.2 203 4/25/2025
Loading failed

PseudoSomModelHandler default handler for single model
Fixed Register Model for PseudoSOM
PseudoSomModelHandler basic event handler for PseudoSom models
InnerPseudoSomModelHandler event handler for Inner PseudoSom models
PseudoSomModelFactory factory for create PseudoSom models