I made a wrapper to support this: https://gist.github.com/ayosec/816ccba7a75aba5336db0fe0b9791...
<script>
fetch(".").then(r => console.log(r));
fetch("/").then(r => console.log(r));
</script>
The console show errors when these URLs are loaded: TypeError: NetworkError when attempting to fetch resource. test.html:2:1 if (my_pointer != NULL)
do_stuff(*my_pointer)