User:A2569875/sandbox
IE瀏覽器對WebGL的支援較低,但部分程式庫缺少的需求是可以自行實作的,例如web a Frame缺少CustomEvent,實作後部分功能方可正常使用。
<script>
(function () {
if ( typeof window.CustomEvent === "function" ) return false;
function CustomEvent ( event, params ) {
params = params || { bubbles: false, cancelable: false, detail: undefined };
var evt = document.createEvent( 'CustomEvent' );
evt.initCustomEvent( event, params.bubbles, params.cancelable, params.detail );
return evt;
}
CustomEvent.prototype = window.Event.prototype;
window.CustomEvent = CustomEvent;
})();
</script>