Message from JavaScript discussions

September 2020

β€” Nope, the easiest way is to unblur your mind out of camouflaged content🀀 open source for life


My website has a variable in global scope. How do I find out which javascript file has created this variable?

β€” In dev tools you can search all files

β€” Ctrl+shift+f

β€” You can't search for browser defined globals though. But you can find out if it comes from the browser with fn.toString()

Message permanent page

β€” Thanks

β€” I really really really hate Safari

β€” (on iOS)

β€” Does the load event never fire on that or am I stupid?

β€” (or both)

β€” Asked in a different way: Why does this work in every browser except Safari?

var dateien = ['', ''];

function jsOnload() {
for (var i in dateien) {
var element = document.createElement("script");
element.src = dateien[i];
if (window.addEventListener) window.addEventListener("load", jsOnload, false);
else if (window.attachEvent) window.attachEvent("onload", jsOnload);
else window.onload = jsOnload;

Message permanent page

β€” Http://