Open Chadtech opened 6 years ago
I was using Elm-Canvas in a project, when Elm-css started erroring with "document is not defined". My work around was adding this code:
var fakeDoc = { createElement: function(){ return { getContext: function() { return { drawImage: function(){}, beginPath: function(){}, rect: function(){}, fill: function(){}, } } }; } }; var D = typeof document === "undefined" ? fakeDoc : document;
I was using Elm-Canvas in a project, when Elm-css started erroring with "document is not defined". My work around was adding this code: