Native Object Vs. Host Object in JavaScript

Both terms are defined in the ECMAScript specfication:

native object

object in an ECMAScript implementation whose semantics are fully defined by this specification rather than by the host environment.

NOTE Standard native objects are defined in this specification. Some native objects are built-in; others may be constructed during the course of execution of an ECMAScript program.


host object

object supplied by the host environment to complete the execution environment of ECMAScript.

NOTE Any object that is not native is a host object.


A few examples:

Native objects: Object (constructor), DateMathparseInteval, string methods likeindexOf and replace, array methods, …

Host objects (assuming browser environment): windowdocumentlocationhistory,XMLHttpRequestsetTimeoutgetElementsByTagNamequerySelectorAll, …



Host objects Vs Native objects In JavaScript


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s