[ Web Proxy ]
URL:
Viewing: https://developer.mozilla.org/zh-CN/docs/Web/API/WebGLContextEvent [Back]  [Original]

WebGLContextEvent - Web API | MDN

MDN Web Docs

View in English Always switch to English

WebGLContextEvent

*

20169

*

WebContextEvent WebGL API WebGL

Event

Event WebGLContextEvent

Event

WebGLContextEvent.statusMessage

Event

WEBGL_lose_context webglcontextlost webglcontextrestored

js
var canvas = document.getElementById("canvas");
var gl = canvas.getContext("webgl");

canvas.addEventListener(
  "webglcontextlost",
  function (e) {
    console.log(e);
  },
  false,
);

gl.getExtension("WEBGL_lose_context").loseContext();

//  "webglcontextlost"  WebGLContextEvent 

WebGL Specification
# 5.15


Web Proxy Viewer  |  New URL  |  Original Page