I'm trying to create some kind of HTML5 drawing, and I ran into a problem with advanced compilation mode. I would like to demonstrate this using the mozDash property of mozDash browsers (although this question is quite important for the attribute optimization function) https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D#Gecko-specific_attributes
The javascript code canvas.mozDash = ... can be expressed as [1] ( (set! (.-mozDash canvas) ...) or [2] (aset canvas "mozDash" ...) in Clojurescript.
I used [1] earlier, and it worked in most cases, however, with the mozDash attribute, the mozDash identifier disappeared as a result of extended compilation. So I tried [2], and it seems that the mozDash identifier mozDash saved using the aset option.
My questions:
- Is this the intended difference between these designations?
- Why is the behavior different ([1] and [2]) for
(.-fillStyle canvas) ?
I suspect that standard HTML properties are protected by default, while non-standard properties (e.g. mozDash ) are not supported.
source share