Continuing from the previous post. I downloaded the Firefox source code and started trying to figure out why textContent was faster than innerHTML.
The FF source code is a daunting beast, around 57,000 files. I started with grep. this returned 57 files for innerHTML and 72 files for textContent. I then used comm to see which files had both words in them, only one did.
Somehow I decided to try looking at the idl files that grep returned. From these files I was able to figure out what I thought were the .cpp files related to the properties.
Here are links to the files on Mozilla’s website
innerHTML is found in this file
Here is a changelog of the setInnerHTML function
I haven’t actually yet figured out what each function does, but I’m getting there. I’m also not sure if I have the correct file for textContent.