[ts] Fix webglcontextlost/restored not correctly bound. See #2938.

This commit is contained in:
Davide Tantillo 2025-09-29 11:51:51 +02:00
parent 201063bbf4
commit 7496a4fb55

View File

@ -47,11 +47,11 @@ export class ManagedWebGLRenderingContext implements Disposable {
}
}
private contextLostHandler (e: Event) {
private contextLostHandler = (e: Event) => {
if (e) e.preventDefault();
}
private contextRestoredHandler () {
private contextRestoredHandler = () => {
for (let i = 0, n = this.restorables.length; i < n; i++)
this.restorables[i].restore();
}