Page Local Variable
This is a JS side feature
<?php
return <<<HTML
<body>
<button onclick="page.dothis();">CLICK ME BRO!</button>
</body>
<script use="willmount">
page.dothis = () => {
console.log('I DID THIS!');
};
</script>
HTML;
?>Last updated