Initialized javascript objects (and dom)

What objects are created natively by javascript compilers (?)?

I studied Io to understand prototyping languages. After doing a bit of research, I found the javascript "Global Object". What I can't seem to wrap is where the other built-in functions / prototypes / objects come from.

There is a print object and I don't know where it was created. Was it built by the v8 engine I am using to run the javascript code?

And similarly, I'm a bit confused about what objects are created in the browser natively. I understand that the browser creates a dom in javascript. For example, a document object. But what other objects exist?

In addition, in Io, you can view all objects to which memory has been allocated. It is accessed through the Lobby. Is there something like this in javascript?


source to share

1 answer

My favorite javascript reference in the browser, globals and DOM objects MDN .

The browser creates a whole bunch of objects and makes them available for javascript access. They are created by the browser (not the javascript engine as they are not officially part of javascript), but the browser makes them available from javascript.

For example, a browser creates an object document

, an object window

that serves as global object

the browser and adds a whole bunch of properties to the object window


You can view a list of enumerated object properties window

in your specific browser from this sample app: p>

Javascript itself creates some objects, creating its own control functionality for it. For example, there is usually an object Math

that contains a bunch of math methods and a Date object that contains date binding functionality.



All Articles