webglcontextlost
Das webglcontextlost
Event der WebGL API wird ausgelöst, wenn der User-Agent feststellt, dass der mit dem WebGLRenderingContext
-Objekt verknüpften Drawing Buffer verloren gegangen ist.
Bubbles | Ja |
Cancelable | Ja |
Zielobjekt | HTMLCanvasElement |
Interface | WebGLContextEvent (en-US) |
Beispiel
Mit der Hilfe der WEBGL_lose_context
(en-US) Extension kann das webglcontextlost
Event simuliert werden:
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" event is logged.
Vererbung
Das webglcontextlost
Event implementiert das WebGLContextEvent
(en-US) Interface, welches die Eigenschaften und Methoden von Event
erbt.
Spezifikationen
Spezifikation | Status | Hinweis |
---|---|---|
WebGL 1.0 Die Definition von 'webglcontextlost' in dieser Spezifikation. |
Empfehlung | Grundlegende Definition. |
Browser-Kompatibilität
Wir konvertieren die Kompatibilitätsdaten in ein maschinenlesbares JSON Format.
Diese Kompatibilitätstabelle liegt noch im alten Format vor,
denn die darin enthaltenen Daten wurden noch nicht konvertiert.
Finde heraus wie du helfen kannst! (en-US)
Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari |
---|---|---|---|---|---|
Basic support | 9 | 4.0 (2.0) | 11 | 12 | 5.1 |
Feature | Android | Chrome for Android | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|---|
Basic support | ? | 25 | 4.0 (2.0) | ? | 12 | 8.0 |