update build
This commit is contained in:
parent
c87a250588
commit
cb1366d05c
26
disable_auto_eval.html
Normal file
26
disable_auto_eval.html
Normal file
|
@ -0,0 +1,26 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<link rel="stylesheet" href="css/style.css">
|
||||
<script src="js/scittle.js" type="application/javascript"></script>
|
||||
<script>scittle.core.disable_auto_eval()</script>
|
||||
<!-- to do the same as scittle does by default: -->
|
||||
<!-- <script>scittle.core.eval_string("(.addEventListener js/document \"DOMContentLoaded\" js/scittle.core.eval_script_tags false)")</script> -->
|
||||
<script type="application/x-scittle">
|
||||
(defn my-alert []
|
||||
(js/alert "You clicked!"))
|
||||
|
||||
(set! (.-my_alert js/window) my-alert)
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Scittle</h1>
|
||||
<p>On this page, auto-eval is disabled.</p>
|
||||
<p><button onclick="scittle.core.eval_script_tags()">
|
||||
Click me to evaluate script tags!
|
||||
</button></p>
|
||||
<p><button onclick="my_alert()">
|
||||
Click me to run evaluated function!
|
||||
</button></p>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in a new issue