1

A JavaScript object is divided into Native object, and Host object

Built-in Object : An object that is part of the JavaScript language defined in the ECMAScript specification.
ex) Global, String, Boolean, Number, Math, RegExp, Object, Function, Array, Date, Math, RegExp, Error

Host Object: Objects built from browsers, those who run the JavaScript engine
ex) window, document, location, history, XMLHttpRequest, setTimeout, getElementsByTagName, querySelectorAll

and some by Built-in object, Native object, and Host object.

Built-in Object : An object that is part of the JavaScript language defined in the ECMAScript specification.
ex) Global, String, Boolean, Number, Math, RegExp, Object, Function, Array, Date, Math, RegExp, Error

Native Object : Objects built from browsers, those who run the JavaScript engine
ex) window, document, location, history, XMLHttpRequest, setTimeout, getElementsByTagName, querySelectorAll

Host Object : Objects created by the user

Are both correct? Is it the latter case if I split the host object smaller?

jini
  • 373
  • 1
  • 5
  • 15
  • 1
    Where are the two quotes taken from ? They are loosely defined terms but usually Host Objects are associated with what the first definition describes. – lorefnon Jun 09 '19 at 05:10
  • thanks! I was confused because the description on each site was slightly different. https://poiemaweb.com/js-built-in-object (is in Korean) http://insanehong.kr/post/javascript-object/ (is in Korean) https://stackoverflow.com/questions/7614317/what-is-the-difference-between-native-objects-and-host-objects – jini Jun 09 '19 at 05:18
  • 1
    Ok, I'd trust the definition in the specification: http://es5.github.io/#x4.3.6 – lorefnon Jun 09 '19 at 05:26
  • 1
    There is also a possibility that the JavaScript engine is hosted in a custom environment, which provides its own custom native objects (neither DOM nor Node). – felix-b Jun 09 '19 at 05:48
  • ah-ha I got it ! thank you :D – jini Jun 10 '19 at 13:33
  • The second quote is wrong. – Bergi Jan 07 '21 at 13:12

0 Answers0