The idea is that the class IDs are global and identical for all the runtimes which eases data passing between runtimes e.g. with workers. That's why JS_NewClassID () returns a new ID only if the ...
Where does JavaScript fall in this regard? JS has had some class-like syntactic elements (like new and instanceof) for quite awhile, and more recently in ES6, some additions, like the class keyword.