3 ms·
There was no DOM back in the early days of Javascript. The page was rendered in a single pass, you could inject text and markup via document.write() and anythin
by ben509 9y ago
There was no DOM back in the early days of Javascript. The page was rendered in a single pass, you could inject text and markup via document.write() and anything "dynamic" was accomplished by reloading an IFRAME. Remember, these were the days when too many tables would crash your browser; I recall the early demos of Gecko showing deeply nested tables, and all styling was with font tags still.
Netscape was still trying to sell a browser, and they wanted a common language on the frontend and backend, so Javascript was also on Netscape Server.
- shagie 9y agoMaybe the 'DOM' wasn't the right word choice. However, in 1995 one could foo = document.getElementById and foo.innerHTML as described in https://docs.oracle.com/javase/tutorial/deployment/applet/invokingJavaScriptFromApplet.html https://docs.oracle.com/javase/tutorial/deployment/applet/in... It was possible to call JavaScript from a Java applet and method in a Java applet from JavaScript (on a web page). This functionality can be seen in Java 2 (now known as Java 1.2) - http://www.oracle.com/technetwork/java/basics-137133.html http://www.oracle.com/technetwork/java/basics-137133.html . https://en.wikipedia.org/wiki/Netscape_(web_browser)#Release_history https://en.wikipedia.org/wiki/Netscape_(web_browser)#Release... has JavaScript and Java as part of the same release for Netscape. The next release of Netscape Navigator (3.0) had LiveConnect version 1 ( http://web.mit.edu/javascript/src/mozilla/js/src/liveconnect/README.html http://web.mit.edu/javascript/src/mozilla/js/src/liveconnect... ) which was that cross language communication. I would be willing to contend that in the view of "Java applets are where the web is going" back then, the difficulty of communication between the applet and the enclosing page was something that needed some scripting glue and that JavaScript, from its inception, was to be that glue. It took about a year to get it working, but this was the initial goal of JavaScript.