EDIT : SORRY, PROBLEM IS DIFFERENT
- It should be
instead of
It seems that executes
init();
before all HTML contend inside body
is created.
I particular, have this HTML:
and inside init_GLSLScreen()
I need to run updateShader
with textarea name="txtScene"
as an argument. Like this
function init_GLSLScreen(){
// ... some stuff ... don't care
console.log ( document.getElementById("txtScene") );
updateShader( document.getElementById("txtScene") );
// ... some stuff ... don't care
}
But document.getElementById("txtScene")
returns null
The problem is described here with solution to either move the javascript below HTML (I guess not possible in my case) or to run the javascript onLoad
... which I do but does not work.
Striped down code which reproduces this behaviour (if you look into web-console)
05.10 - Custom fragment shader
No comments:
Post a Comment