Skip to main content

HTML <include>s

Sciter allows to assemble a document from fragments at load time by using <include> meta element:

<include src="url" [media="..."]>
... fallback content (optional) ...

If fallback content is provided it will appear in final DOM if url data is not available or if media expression will be resolved to false.

This feature allows to load fragments as conditionally, by using media expressions, as unconditionally:

<include src="windows-header.htm" media='platform == "Windows"' />
<include src="osx-header.htm" media='platform == "OSX"' />
<include src="linux-header.htm" media='platform == "Linux"' />
<include src="content.htm" />