argumentsobject has been completely obviated by the introduction of
...argsin ES6. It was always difficult to explain the weird way it interacted with named arguments and to always caution about its performance implications. You may still see it in legacy code and you may be reminded of its presence if you try to name a local variable or function parameter
argumentsin strict mode, but now that we have rest arguments, it should be allowed to slink into oblivion.
We used to have to worry about the performance of repeated string concatenation. There was a period of where we all learned to push strings onto an array, and then use
document.write(), but you had to be careful to break the closing
</script>tag into two strings so that the HTML parser wouldn’t interpret it as the end of the currently-running script.
HTML didn’t have an
<iframe>in the early days, but there was
window.framesproperty was an array of the nested window objects that represented the frames in a document. It was possible to actually call the
open()method of a document in a frame, and then use
document.write()to dynamically generate an entire document inside that frame. That was kind of cool, actually. Because frames could be nested inside other frames, every Window object had a
framesarray that contained its children frames, and a
parentproperty that referred to the containing window, and a
topproperty that referred to the toplevel window. Earlier editions of my book dedicated long sections and complicated figures to explaining all of this.
There are all kinds of obsolete techniques for referring to particular elements within a document. The
framesarray was one, but, IIRC, there were also
imagesarrays as well that were literally just a list of all the links and images in a document. IE (version 4, I think) went all-in and introduced
document.all: an array of all elements in the document. (This was the beginning of the DOM and of “DHTML”—kind of like the first fish that crawled onto dry land.)
document.allhad all kinds of weird features: it was an array that also had methods for looking up elements by name or something like that.
document.allwas never standardized, but even the standard methods like
document.getElementsByClassName()seem obsolete today, crushed into irrelevance by jQuery’s
$()function and the standard
document.querySelectorAll()methods that it inspired. Through the power of CSS selectors those two functions obsolete everything that came before.
The thing I hated most about Internet Explorer was that it used an
attachEvent()method for registering event handlers. In my memory, they did this even though the standard
efrom the document, you couldn’t just write
e.remove()as we would today. You actually had to write
Anyway, it is 2020 now and I promise that the new 7th edition of my book will not subject you to lengthy explanations of any of those old features that are best left forgotten.