From the course: Vanilla JavaScript: Building on the Document Object Model (DOM)

Unlock the full course today

Join today to access over 24,800 courses taught by industry experts.

Parsing elements

Parsing elements

- [Instructor] Now, parsing element content is the most complex task we need to do to complete our HTML parser. This is because some elements have no closed tag, some attributes have no values, and many elements have nested element content. It's this nesting that the recursive part of our recursive descent parser will handle. So once again, our development environment is very simplistic. We're going to be using the Python built-in web server. So Python dash M http server that's comes with Python three in our project folder, and we're going to be using Chrome as our browser. So you can see over here, this is the current version of the code, and I'll be using my text editor, which at the moment I'm using Atom, which I still kind of like. So in order to support element parsing, we're going to be modifying the parse loop, which is located here in the parse content function and as you can see, we're currently parsing…

Contents