I've been having this issue alot today. Every time I use the HTML DOM for finding parts of the page it always returns an error saying "...is not a function."
Everything from printing to the page to even simply changing the page title just fails.
I've used JSLint, looked it up, etc. and still don't have a clue what this means.
What's even more strange is that I easily got it to work on a different page using the same methods. Here was an attempt to create a loading animation for the title bar:
var loadingstat;
loadingstat = false;
var pgtA;
pgtA = 0;
setInterval(pgtUpdater(), 80);
function pgtUpdater() {
if (pgtA == 0 && loadingstat = true) {
document.getElementsByTagName[0]("title").innerHTML = "-=-=-";
++pgtA;
} else {
if (pgtA == 1 && loadingstat = true) {
document.getElementsByTagName[0]("title").innerHTML = "=-=-=";
++pgtA;
} else {
if (pgtA == 2 && loadingstat = true) {
document.getElementsByTagName[0]("title").innerHTML = "-/ \-";
++pgtA;
} else {
if (pgtA == 3 && loadingstat = true) {
document.getElementsByTagName[0]("title").innerHTML = "</ \>";
++pgtA;
} else {
if (pgtA == 4 && loadingstat = true) {
document.getElementsByTagName[0]("title").innerHTML = "/ \ ";
++pgtA;
} else {
if (pgtA == 5 && loadingstat = true) {
document.getElementsByTagName[0]("title").innerHTML = "\ /";
++pgtA;
} else {
if (pgtA == 6 && loadingstat = true) {
document.getElementsByTagName[0]("title").innerHTML = "<\ />";
++pgtA;
} else {
if (pgtA == 7 && loadingstat = true) {
document.getElementsByTagName[0]("title").innerHTML = "-\ /-";
++pgtA;
} else {
if (pgtA == 8 && loadingstat = true) {
document.getElementsByTagName[0]("title").innerHTML = "=-=-=";
++pgtA;
} else {
if (pgtA == 9 && loadingstat = true) {
document.getElementsByTagName[0]("title").innerHTML = "-=-=-";
++pgtA;
} else {
if (pgtA == 10 && loadingstat = true || loadingstat = false) {
document.getElementsByTagName[0]("title").innerHTML = "-----";
pgtA = 0;
}
}
}
}
}
}
}
}
}
}
}
}
I've never actually had this issue until today. This always seems to happen whenever I try to edit an element in the page.
Also I am aware that these conditions aren't written properly, I'm currently working on fixing that.

loadingstat = truetoloadingstat == true.document.getElementsByTagName[0]("title")todocument.getElementsByTagName("title")[0].