How to access createjs instance from zim npm

146 Views Asked by At

My project is developed using createjs in react framework. I have added zimjs npm in my project. on console.log(zim) I found zim object contains window.createjs, I can't figure out how to access createjs library. I don't anything for this in zim docs. I tired zim.createjs, window.createjs nothing works.

1

There are 1 best solutions below

0
On

ZIM expects createjs to be in the global scope. So if you have window.createjs then try adding const createjs = window.createjs; before creating the ZIM Frame. (I am not sure what you mean by there is a window.createjs inside the zim object. That would be a little odd).