EmptyFlow.SciterAPI
1.2.1
dotnet add package EmptyFlow.SciterAPI --version 1.2.1
NuGet\Install-Package EmptyFlow.SciterAPI -Version 1.2.1
<PackageReference Include="EmptyFlow.SciterAPI" Version="1.2.1" />
<PackageVersion Include="EmptyFlow.SciterAPI" Version="1.2.1" />
<PackageReference Include="EmptyFlow.SciterAPI" />
paket add EmptyFlow.SciterAPI --version 1.2.1
#r "nuget: EmptyFlow.SciterAPI, 1.2.1"
#:package EmptyFlow.SciterAPI@1.2.1
#addin nuget:?package=EmptyFlow.SciterAPI&version=1.2.1
#tool nuget:?package=EmptyFlow.SciterAPI&version=1.2.1
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+.
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.CreateMainWindow ( 300, 300, enableDebug: true, enableFeature: true ); // create main window and enable debug mode and sciter features (like access to system in JavaScript)
host.AddWindowEventHandler ( new MyWindowEventHandler ( 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
}
}
}
Migration from 1.0.11 to 1.1.0
Check out refreshed example above, below details of breaking changes:
- Don't need call
SciterLoader.Initialize ( pathToLibrary );separately, now it will be call insideSciterAPIHost(pathToLibrary)constructor - Method
SciterAPIHost.LoadAPInow obsolete because it also called inside constructor
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 |
Roadmap
Binding for core APICreate main window and start processBehaviour Event Handler Factory (injectbehavior: namefrom css or style attribute)Add custom file protocolCreate/Delete Event HandlerElement(s) selectorGet/Set Element Text/HtmlEvent Handler as class with overrided methodsGet/Set Element AttributesHelpers for Scriter Value APIBinding for Graphics APIBinding for Request APIGet/Set Variables- Support SOM mapping
- Helpers for Sciter Node API
- Helpers for Graphics API
| Product | Versions 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. |
-
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.1 | 81 | 1/3/2026 |
| 1.2.0 | 261 | 12/17/2025 |
| 1.1.0 | 171 | 11/28/2025 |
| 1.0.11 | 188 | 10/15/2025 |
| 1.0.10 | 295 | 7/20/2025 |
| 1.0.9 | 190 | 7/14/2025 |
| 1.0.8 | 194 | 7/8/2025 |
| 1.0.7 | 194 | 6/29/2025 |
| 1.0.6 | 299 | 6/7/2025 |
| 1.0.5 | 122 | 6/7/2025 |
| 1.0.4 | 217 | 6/2/2025 |
| 1.0.3 | 243 | 5/6/2025 |
| 1.0.2 | 178 | 4/25/2025 |
| 1.0.1 | 210 | 4/18/2025 |
| 1.0.0 | 226 | 4/10/2025 |
SciterAPIHost.MoveWindow move window to new position
SciterAPIHost.GetWindowTopMost get value of isTopmost
SciterAPIHost.SetWindowTopMost set value isTopmost
SciterAPIHost.GetWindowMaximizable get value of isMaximizable
SciterAPIHost.SetWindowMaximizable set value isMaximizable
SciterAPIHost.GetWindowMinimizable get value of isMinimizable
SciterAPIHost.SetWindowMinimizable set value isMinimizable
SciterAPIHost.GetWindowEnabled get value of isEnabled
SciterAPIHost.SetWindowEnabled set value isEnabled
SciterAPIHost.GetWindowCaption get value of caption
SciterAPIHost.SetWindowCaption set value caption
SciterAPIHost.GetWindowFrameType get value of frameType
SciterAPIHost.SetWindowFrameType set value frameType
SciterAPIHost.GetWindowResizable get value of isResizable
SciterAPIHost.SetWindowResizable set value isResizable
SciterAPIHost.ExecuteWindowEval can evaluate any custom script in context of window
SciterAPIHost.ShowWindowSelectFileDialog show open or save file dialog