We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 04bc782 commit b3dcb05Copy full SHA for b3dcb05
src/index.ts
@@ -1,7 +1,7 @@
1
// provides a virtual dom for lcjs to use
2
import { JSDOM } from 'jsdom'
3
// font support
4
-import { registerFont } from 'canvas'
+import { createCanvas, registerFont, Image } from 'canvas'
5
// headless-gl that implements WebGL in Node
6
import createContext from 'gl'
7
import { polyfill as rafPolyfill } from 'raf'
@@ -80,6 +80,10 @@ dom.window.fetch = function () {
80
// suppress alert
81
dom.window.alert = function () { }
82
83
+dom.window.Image = Image
84
+
85
+dom.window.lcjs_setup = createCanvas
86
87
/**
88
* Monkey patch a function from LightningChart interface.
89
* Inserts the default parameters that are different from browser environment.
0 commit comments