bee-browser / bee

An HTML5-compliant small browser engine for embedding
Apache License 2.0
4 stars 1 forks source link

feat(jsruntime): closures #195

Closed masnagam closed 2 months ago

masnagam commented 3 months ago
masnagam commented 3 months ago

we have to consider about the following example:

<script>
  let b = () => console.log(a);
</script>
<script>
  let a = 1;
  b();
</script>

this example should work. that is, the global environment record should be shared with scripts. it should be allocated on the heap.

in this ticket, we won't implement the global environment record. #221 was added for that.