I already know that when I lose WebGL context, there is context restore eventListener and it handle restore process internally(by call vtkOpenGLRenderWindow.restoreContext()).
But I have received some warning message like below and there is no restored object in vtkRenderWindow.
Let me show you the code I tested.
My test code very simple.
just one cone was added to renderer.
And I call loseContext() and call restoreContext() after 3 seconds.
var fullScreenRenderer = vtkFullScreenRenderWindow.newInstance();
var actor = vtkActor.newInstance();
var mapper = vtkMapper.newInstance();
var cone = vtkConeSource.newInstance();
actor.setMapper(mapper);
mapper.setInputConnection(cone.getOutputPort());
var renderer = fullScreenRenderer.getRenderer();
renderer.addActor(actor);
renderer.resetCamera();
var renderWindow = fullScreenRenderer.getRenderWindow();
renderWindow.render();
let originContext, restoredContext;
originContext = fullScreenRenderer.getApiSpecificRenderWindow().getContext();
const ext = originContext.getExtension('WEBGL_lose_context');
ext.loseContext();
setTimeout(() => {
ext.restoreContext();
}, 3000);