ShaderEditorExtension icon indicating copy to clipboard operation
ShaderEditorExtension copied to clipboard

window.postMessage doesn't seem to work the first time it's injected

Open spite opened this issue 10 years ago • 0 comments

At the end of the injected function, there's a call to

window.postMessage( { source: 'WebGLShaderEditor', method: 'init' }, '*');

which doesn't seem to work. That message would signal that the WebGLRenderingContext has been hooked, and that everything is ready to start getting events, so the UI should be visible, or at least a message that says "Waiting for programs to be created..."

That doesn't work, so now I'm using the first "addProgram" message to signal that there's activity.

spite avatar Apr 07 '15 15:04 spite