Controls

Adds controls for an iframe.

chemicalAction takes two arguments, a command (back, forward, reload, or close) and an ID of a iframe component.

The close function hides the iframe and controls.

<input data-frame="my-iframe" is="chemical-input">
<section id="my-controls" is="chemical-controls">
    <button onclick="chemicalAction('back', 'my-iframe')">←Back</button>
    <button onclick="chemicalAction('forward', 'my-iframe')">Forward</button>
    <button onclick="chemicalAction('reload', 'my-iframe')">Reload</button>
    <button onclick="chemicalAction('close', 'my-iframe')">Close</button>
</section>
<iframe data-controls="my-controls" id="my-iframe" is="chemical-iframe"></iframe>

Config (For iFrame)

PropertyValueDescription
data-controlsstringID of controls component.