Thanks for the reply , i have been over a few of those before, the clone gives no errors
but
if i add an id "test" to the div containing the canvas
var oldNode = document.getElementById("test");
var newNode = oldNode.cloneNode(true);
oldNode.parentNode.insertBefore(newNode, oldNode);
oldNode.parentNode.removeChild(oldNode);
i get no errors but the keyboards stays locked
also if i add
var oldNode = document.getElementById("canvas");
var newNode = oldNode.cloneNode(true);
oldNode.parentNode.insertBefore(newNode, oldNode);
oldNode.parentNode.removeChild(oldNode);
same thing
using
var element = document.getElementById("test");
element.outerHTML = element.outerHTML;
clears the canvas but i can hear the application continuing to run and the keyboard stays locked
if i use
straight at the end of the page the keyboard stays loose ,
however , it gives a Module = null error in the statusdiv above the canvas
if i use it in a function
<script>
function closure(){
/*
//with or without
//id = test and / or
var oldNode = document.getElementById("canvas");
var newNode = oldNode.cloneNode(true);
oldNode.parentNode.insertBefore(newNode, oldNode);
oldNode.parentNode.removeChild(oldNode);
*/
window.Module = null;
}
</script>
and link that to a button , then when i click it gives Module = null , but the listeners stay active, what i see in the concole is that agkplayer.js is still responding so its the script thats still running, the events seem to be linked to the document and there's no specifi id i can find (im not really a professional, lol)
so actually once its loaded and running it keeps running until the whole document is replaced ( as far as i can figure) and i have no clue how to interrupt that because i dont know the function (method?) if any at all exists and how to call it.
So i can break it (haha) but thats not really what it should be and once its fully loaded it wont even if the visible execution will stop.
All things considered, since these are just for snippets , and AppGameKit is only one, if i really need the actual identifiers then its folly to try this without a generic or general killall() command , i noticed phaser keeps running too (the sound just goes on) when a div is loaded so thats gonna be the script looping , if i move on to three.js and more its gonna be too much to add to the end of the page if each one needs a specific break or hack (if you can call it that) and there's also the question of leaky memory spots b/c i noticed firefox (or any of the others) arent always as great as they promise to be ... sometimes more like windows 95 : "reboot every four hours"
If anyone has a reference doc to the functions and calls used in agkplayer.js that would be still awesome and thank YOU for the page, that was certainly educational but unless im really mistaken there is no general method to do this (assume its "in the name of safety") without complete reloading (which collects all trash at once)
and
well i can keep talking but i think that summarizes it , a general sort of killall() command or a way to remove running scripts might help all across the board , and always any suggestions or tips at all are most welcome
thanks a lot for the reply !!!
<hr>
the loaders are random daily (https://tyrnannoght.eu) but the main AppGameKit would be here : https://tyrnannoght.eu/dlgame/ its using the mesh constructor from the minecraft thing (but i see the guy got banned) so still looking for a way to remove meshes (but it DOES have collision, although compound primitive, not mesh-perfect) and atm trying to mesh thorbjorn tiled (delimited csv) for easy levelmapping but the readtimes seem really slow ... but thats for another topic (and its a hobby, not a project)