Open finscn opened 8 years ago
I found an easy way to implement this feature , just add this code to Ejecta.js
(function(){
var element = document.createElement("img");
HTMLImageElement = function(){};
HTMLImageElement.prototype = element.__proto__;
var element = document.createElement("canvas");
HTMLCanvasElement = function(){};
HTMLCanvasElement.prototype = element.__proto__;
var element = document.createElement("video");
HTMLVideoElement = function(){};
HTMLVideoElement.prototype = element.__proto__;
var element = document.createElement("audio");
HTMLAudioElement = function(){};
HTMLAudioElement.prototype = element.__proto__;
})();
Notice : the code must be after "window.document = { ... }" in Ejecta.js.
Hi , @phoboslab ,
In Ejecjta , the below "instanceof" checking can't pass :
In PIXI.js v4 , the "instanceof" checking is very useful , I hope Ejecta could support it.
~~I add this feature in my fork version ~~
https://github.com/finscn/Ejecta/commit/5f80a03747233efba914a2793bf4db10c9159d80I hope it could help you.
There are too many differences between my fork version and origin ejecta , So I don't give a PR. And I found that you have never accept my PR , maybe there are too many differences between our code spec. & style , So I think my PR is useless for you.