You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is my understanding that the only way to produce a value with type CanvasElement is to use getCanvasElementById. This forces use of an HTML id, but there are ways to access HTML elements without them having an id (i.e. with getHTMLElementRef in Halogen, for instance).
It would be nice to have a function fromElement :: HTMLElement -> Maybe CanvasElement (or HTMLElement -> Maybe CanvasElement).*
Doing away with the need for HTML IDs reduces the risk of collision between e.g. canvases from two instances of the same Halogen component.
It is my understanding that the only way to produce a value with type
CanvasElement
is to usegetCanvasElementById
. This forces use of an HTMLid
, but there are ways to access HTML elements without them having anid
(i.e. withgetHTMLElementRef
in Halogen, for instance).It would be nice to have a function
fromElement :: HTMLElement -> Maybe CanvasElement
(orHTMLElement -> Maybe CanvasElement
).*Doing away with the need for HTML IDs reduces the risk of collision between e.g. canvases from two instances of the same Halogen component.
*
HTMLElement
is defined here: https://pursuit.purescript.org/packages/purescript-web-html/4.1.0/docs/Web.HTML.HTMLElement#t:HTMLElementElement
is defined here: https://pursuit.purescript.org/packages/purescript-web-dom/6.0.0/docs/Web.DOM.Internal.Types#t:ElementThe text was updated successfully, but these errors were encountered: