Input
An input that encodes the value and does something with it on enter.
<input data-target="_self" is="chemical-input">
The data-action
attribute runs a custom function on enter. This example logs the encoded url in the console.
<input data-action="logURL" is="chemical-input">
<script>
function logURL(url) {
console.log(url)
}
</script>
Options
Property | Value | Description |
---|---|---|
data-target | _self | _blank | Self opens in current tab, blank in new tab. |
data-action | string | Function name that is called on enter. |
data-service | uv | scramjet | meteor | rammerhead | The proxy service to use. |
data-auto-http | add with no value for true | Automatically add https://. |
data-search-engine | string | URL with %s for query. |
data-service-store | add with no value for true | Use store for service. |
data-autoHttps-store | add with no value for true | Use store for autoHttps. |
data-searchEngine-store | add with no value for true | Use store for searchEngine. |