用户: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>