JavaScript 系列 - object

99 阅读1分钟

标准内置对象

  • 标准内置对象指的是处在全局作用域里的多个对象
  • 全局作用域中的其他对象则可由用户的脚本创建,或由宿主程序提供

Global 对象

  • 在全局作用域里通过使用 this 访问
  • windows 对象是浏览器实现的 Global 对象的代理
  • 标准内置对象 + 用户创建内容 + 宿主程序提供

分类

值属性

  • Infinity
  • NaN
  • undefined
  • globalThis

函数属性

  • eval()
  • uneval()
  • isFinite()
  • isNaN()
  • parseFloat()
  • parseInt()
  • decodeURI()
  • decodeURIComponent()
  • encodeURI()
  • encodeURIComponent()

基本对象

  • Object
  • Function
  • Boolean
  • Symbol

错误对象

  • Error
  • AggregateError
  • EvalError
  • InternalError
  • RangeError
  • ReferenceError
  • SyntaxError
  • TypeError
  • URIError

数字和日期对象

  • Number
  • BigInt
  • Math
  • Date

字符串

  • RegExp
  • String

可索引的集合对象

  • Array
  • Int8Array
  • Uint8Array
  • Uint8ClampedArray
  • Int16Array
  • Uint16Array
  • Int32Array
  • Uint32Array
  • Float32Array
  • Float64Array
  • BigInt64Array
  • BigUint64Array

使用键的集合对象

  • Map
  • Set
  • WeakMap
  • WeakSet

结构化数据

  • ArrayBuffer
  • SharedArrayBuffer
  • Atomics
  • DataView
  • JSON

控制抽象对象

  • Promise
  • Generator
  • GeneratorFunction
  • AsyncFunction

反射

  • Reflect
  • Proxy

国际化

  • Intl
  • Intl.Collator
  • Intl.DateTimeFormat
  • Intl.ListFormat
  • Intl.NumberFormat
  • Intl.PluralRules
  • Intl.RelativeTimeFormat
  • Intl.Locale

WebAssembly

  • WebAssembly
  • WebAssembly.Module
  • WebAssembly.Instance
  • WebAssembly.Memory
  • WebAssembly.Table
  • WebAssembly.CompileError
  • WebAssembly.LinkError (en-US)
  • WebAssembly.RuntimeError

其他

  • arguments

宿主对象

  • Background Tasks
  • Beacon
  • Broadcast Channel API
  • CSSOM
  • Canvas API
  • Channel Messaging API
  • Clipboard API
  • Console API
  • DOM
  • Fetch API
  • File API
  • File System Access API
  • File and Directory Entries API
  • Fullscreen API
  • Geolocation API
  • HTML DOM
  • HTML Drag and Drop API
  • History API
  • IndexedDB
  • Intersection Observer API
  • Page Visibility API
  • Performance API
  • Pointer Events
  • Push API
  • Resize Observer API
  • Screen Capture API
  • Service Workers API
  • Storage
  • Streams
  • Touch Events
  • UI Events
  • URL API
  • Visual Viewport
  • Web Audio API
  • Web Components
  • Web Notifications
  • Web Speech API
  • Web Storage API
  • Web Workers API
  • WebCodecs API
  • WebGL
  • WebRTC
  • WebVTT
  • Websockets API
  • XMLHttpRequest