<exec-code> Web Component

Usage and Attributes

// load <exec-code> Web Component
<script src="https://exec-code.github.io/element.js">
        
// Use Web Component
<exec-code>
    <template>
        <code>
            console.log("Hello World!");
        </code>
    </template>
</exec-code>
<exec-code autorun>
Execute code immediately after display
<exec-code autorun autoupdate>
Execute code on every user keystroke
<exec-code>
    <template>
        <code locked>
Code can not be edited

Advanced Attributes

<exec-code htmlindent>
Keep original indentation from HTML file