@@ -77,6 +77,7 @@ data JS = JSRaw String
7777 | JSFFI String [JS]
7878 | JSAnnotation JSAnnotation JS
7979 | JSDelete JS
80+ | JSClear JS
8081 | JSNoop
8182 deriving Eq
8283
@@ -133,6 +134,9 @@ compileJS' indent (JSAnnotation annotation js) =
133134compileJS' indent (JSDelete js) =
134135 "delete " `T.append` compileJS' 0 js
135136
137+compileJS' indent (JSClear js) =
138+ compileJS' 0 js `T.append` " = undefined"
139+
136140compileJS' indent (JSFFI raw args) =
137141 ffi raw (map (T.unpack . compileJS' indent) args)
138142
@@ -398,4 +402,3 @@ jsPackSBits16 js = JSNew "Int16Array" [JSArray [js]]
398402
399403jsPackSBits32 :: JS -> JS
400404jsPackSBits32 js = JSNew "Int32Array" [JSArray [js]]
401−