diff --git a/src/Graphics/Canvas.purs b/src/Graphics/Canvas.purs index 716a9a6..c1660f1 100644 --- a/src/Graphics/Canvas.purs +++ b/src/Graphics/Canvas.purs @@ -8,6 +8,13 @@ foreign import data CanvasElement :: * foreign import data Context2D :: * +foreign import getCanvasElementById + "function getCanvasElementById(id) {\ + \ return function() {\ + \ return document.getElementById(id);\ + \ };\ + \}" :: forall eff. String -> Eff (canvas :: Canvas | eff) CanvasElement + foreign import getContext2D "function getContext2D(c) {\ \ return function() {\