html-block demo

html-block is a plain HTML container that gives any slotted markup HAX schema wiring, so pasted or imported HTML can be authored in the HAX editor. By default its content is sanitized on render: inline event handlers are stripped and script tags are escaped into plain text. Setting allowscript after the element is on the page restores the raw markup instead.

Basic usage with slotted HTML

Sanitized by default, raw with allowscript

The sample below carries an inline click handler and a script tag. While sanitization is active the click does nothing and the script tag renders as escaped text. The harness toggles allowscript at runtime, which is also how it is meant to be used, since the element resets the flag whenever it connects to the page.