2

I'm looking for the implementation of the native Javascript functions like: Array.prototype.concat(), Document.getElementsByClassName(), etc.

Just curious how they are implemented?

2
  • 3
    Mozilla have a nice reference developer.mozilla.org/en-US/docs/Web/JavaScript/Reference Commented Oct 22, 2015 at 16:55
  • 3
    @Craicerjack That's a great reference for describing how to use them, but it doesn't say how they're implemented. If I understand the OP's question correctly, they're actually looking for the C code written for each browser to act out this functionality (given that Chromium and Gecko are open source, it must be somewhere) Commented Oct 22, 2015 at 16:59

1 Answer 1

1

You will probably want to look at the JS engine source code, which may or may not be open source. Chrome's V8 for example, is open source: https://code.google.com/p/v8/source/browse

But keep in mind that's likely going to be c or c++.

As someone else already mentioned, if you want more of an algorithmic description for how something like getElementsByClassName works, try the Mozilla network.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.