跳转到内容

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