Skip to content

keltion/shark

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

shark browser

Toy Browser Project for Understanding Browser Engines. I implement a simple version of the browser in this project.

DOM Tree

Currently, there are only two Nodes of Dom, Element and Text.

HTML Parser

The HTML parser in this project is very strict.

  1. No unnecessary spaces are allowed. ex)

    <html > <!--(x)-->
    <html> <!--(o)-->
    <div id ="div1"> <!--(x)-->
    <div id="div"> <!--(o)-->
  2. Element omission is not allowed.

  3. It does not allow omission of closed tags.



Implemented so far

Tokenizes elements in HTML like the following (character is not tokenized yet).

<html><head></head><body><div id="div1"></div><div id="div2"></div></body></html>

image

Plan

  1. Implementing character tokenization.
  2. Logic to create each token as an Element or Text object according to the type of token.
  3. Implementation of HTMLTreeBuilder that creates a DOM tree based on the object created in step 2.
  4. Implement a simple version of the css parser.

About

Toy browser

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages