[TOC]

|

image.png

| | :—-: |

内置对象

JavaScript 内置全局对象有哪些?

没有 Web 浏览器宿主环境的条件下,对于任何 JavaScript 程序,在程序开始之前,JavaScript 解释器都会初始化一个全局对象供程序使用,通过使用该 JavaScript 全局对象,可以访问所有预定义的全局属性、全局普通函数、全局构造函数和全局对象。这些预定义的全局 XX 都是“JS全局对象”的属性。此“JS全局对象”没有名称,可以在全局作用域内使用 this 关键字或引用“JavaScript 全局对象”。

  • 基本对象
    • 内置异常:EvalError、RangeError、ReferenceError、SyntaxError、TypeError、URIError。
    • Object、Function、Boolean。
  • 反射:Proxy、Reflect。
  • 控制对象:Generator、GeneratorFunction、Iterable、Promise。
  • 数值和时间:Date、Math、Number。
  • 文本处理:RegExp、String。
  • 结构化数据:ArrayBuffer、DataView、JSON。
  • 键值对集合:Map、Set、WeakMap、WeakSet。
  • 索引集合:Array、TypedArray、Float32Array、Float64Array、Int16Array、Int32Array、Int8Array、Uint16Array、Uint32Array、Uint8Array、Uint8ClampedArray。
  • 全局对象
    • 全局对象的值属性:Infinity、NaN、undefined
    • 全局对象的其它属性:JSON、Math、Reflect
    • 全局对象的构造器属性:Array、ArrayBuffer、Boolean、DataView、Date、Error、EvalError、Float32Array、Float64Array、Function、Int16Array、Int32Array、Int8Array、Map、Number、Object、Promise、Proxy、RangeError、ReferenceError、RegExp、Set、String、Symbol、SyntaxError、TypeError、Uint16Array、Uint32Array、Uint8Array、Uint8ClampedArray、URIError、WeakMap、WeakSet。

Web 浏览器这个宿主环境中特有的 JavaScript 全局对象为“window 全局对象”,“window 全局对象” 提供了与当前窗口、页面有关的诸多属性与方法。除了这些与浏览器有关的全局属性和方法,window 对象还封装了“JavaScript 内置全局对象”,并向外暴露“JavaScript 内置全局对象的属性与接口”。因此,当进行浏览器端 JavaScript 编程时,只需关心“window 全局对象”即可。

Window 全局内置的属性和方法?

{

  0: global
    blur: ƒ ()
    close: ƒ ()
    closed: false
    focus: ƒ ()
    frames: global {window: global, self: global, location: {…}, closed: false, frames: global, …}
    length: 0
    location: {then: undefined, Symbol(Symbol.toStringTag): undefined, Symbol(Symbol.hasInstance): undefined, Symbol(Symbol.isConcatSpreadable): undefined, replace: ƒ}
    opener: null
    parent: Window {0: global, window: Window, self: Window, document: document, name: "", location: Location, …}
    postMessage: ƒ ()
    self: global {window: global, self: global, location: {…}, closed: false, frames: global, …}
    then: undefined
    top: Window {0: global, window: Window, self: Window, document: document, name: "", location: Location, …}
    window: global {window: global, self: global, location: {…}, closed: false, frames: global, …}
    Symbol(Symbol.hasInstance): undefined
    Symbol(Symbol.isConcatSpreadable): undefined
    Symbol(Symbol.toStringTag): undefined
        __proto__: Object
  ASN1: ƒ o(e,t,n,r,i)
  Base64: {re: /-----BEGIN [^-]+-----([A-Za-z0-9+\/=\s]+)-----END…---|begin-base64[^\n]+\n([A-Za-z0-9+\/=\s]+)====/, decode: ƒ, unarmor: ƒ}
  CodeMirror: {__esModule: true, default: ƒ}
  Hex: {decode: ƒ}
  KJUR: {asn1: {…}}
  MaxErrorReportLimit: 100
  React: {Children: {…}, Fragment: Symbol(react.fragment), Profiler: Symbol(react.profiler), Component: ƒ, PureComponent: ƒ, …}
  ReactDOM: {__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: {…}, createPortal: ƒ, findDOMNode: ƒ, flushSync: ƒ, hydrate: ƒ, …}
  ReactDOMServer: {version: "16.13.1", renderToString: ƒ, renderToStaticMarkup: ƒ, renderToNodeStream: ƒ, renderToStaticNodeStream: ƒ}
  Tracert: o {autoLogPv: true, eventType: "click", autoExpo: false, bizType: "H5behavior", state: "", …}
  TracertCmdCache: [Arguments(2)]
  YuyanMonitor: ƒ r()
  alert: ƒ alert()
  appData: {me: {…}, settings: {…}, env: "prod", space: {…}, isYuque: true, …}
  atob: ƒ atob()
  blur: ƒ blur()
  btoa: ƒ btoa()
  caches: CacheStorage {}
  cancelAnimationFrame: ƒ cancelAnimationFrame()
  cancelIdleCallback: ƒ cancelIdleCallback()
  captureEvents: ƒ captureEvents()
  chrome: {loadTimes: ƒ, csi: ƒ}
  clearInterval: ƒ clearInterval()
  clearTimeout: ƒ clearTimeout()
  clientInformation: Navigator {vendorSub: "", productSub: "20030107", vendor: "Google Inc.", maxTouchPoints: 0, userActivation: UserActivation, …}
  close: ƒ close()
  closed: false
  cnzz_image_820546366: null
  cnzz_image_1511981644: null
  confirm: ƒ confirm()
  cookieStore: CookieStore {onchange: null}
  count: 0
  createImageBitmap: ƒ createImageBitmap()
  crossOriginIsolated: false
  crypto: Crypto {subtle: SubtleCrypto}
  customElements: CustomElementRegistry {}
  defaultStatus: ""
  defaultstatus: ""
  devicePixelRatio: 1
  document: document
  external: External {}
  fetch: ƒ ()
  filterCSS: ƒ (e,t)
  filterXSS: ƒ i(e,t)
  find: ƒ find()
  focus: ƒ focus()
  frameElement: null
  frames: Window {0: global, window: Window, self: Window, document: document, name: "", location: Location, …}
  g_prefetch: {fetchReadDocData: Promise}
  getBlockTitle: ƒ L(e)
  getComputedStyle: ƒ getComputedStyle()
  getFirstNodeText: ƒ E(e)
  getNodeText: ƒ I(e)
  getSelection: ƒ getSelection()
  h5: false
  hasRegisterLakeDocClipboard: true
  hashDetection: ƒ hashDetection(t,e)
  history: History {length: 3, scrollRestoration: "auto", state: {…}}
  indexedDB: IDBFactory {}
  innerHeight: 946
  innerWidth: 771
  isList: ƒ x(e)
  isSecureContext: true
  length: 1
  localStorage: Storage {note/orderby/419127: "first_published_at", note/latest/updated/419127: "2020-12-10T01:56:09.000Z", announcementVisible: "true", autosave/docs/19533934/lake: "{"draft_version":0,"base_timestamp":"2020-12-09T13…,但是当前npm上大部分包都是commonjs的类型,导致现阶段还不能用于中大型项目。</p>"}", page_dashboard_doc: "content_updated_at^^ascend", …}
  location: Location {ancestorOrigins: DOMStringList, href: "https://www.yuque.com/demainwangjianxin/wmnlxt/znt0o9", origin: "https://www.yuque.com", protocol: "https:", host: "www.yuque.com", …}
  locationbar: BarProp {visible: true}
  lozad_observer: {observer: IntersectionObserver, observe: ƒ, triggerLoad: ƒ}
  matchMedia: ƒ matchMedia()
  menubar: BarProp {visible: true}
  moment: ƒ c()
  moveBy: ƒ moveBy()
  moveTo: ƒ moveTo()
  name: ""
  nameStorage: {setItem: ƒ, getItem: ƒ, removeItem: ƒ, clear: ƒ, valueOf: ƒ, …}
  navigator: Navigator {vendorSub: "", productSub: "20030107", vendor: "Google Inc.", maxTouchPoints: 0, userActivation: UserActivation, …}
  onabort: null
  onafterprint: null
  onanimationend: null
  onanimationiteration: null
  onanimationstart: null
  onappinstalled: null
  onauxclick: null
  onbeforeinstallprompt: null
  onbeforeprint: null
  onbeforeunload: null
  onblur: null
  oncancel: null
  oncanplay: null
  oncanplaythrough: null
  onchange: null
  onclick: null
  onclose: null
  oncontextmenu: null
  oncuechange: null
  ondblclick: null
  ondevicemotion: null
  ondeviceorientation: null
  ondeviceorientationabsolute: null
  ondrag: null
  ondragend: null
  ondragenter: null
  ondragleave: null
  ondragover: null
  ondragstart: null
  ondrop: null
  ondurationchange: null
  onemptied: null
  onended: null
  onerror: ƒ (message, source, lineno, colno, error)
  onfocus: null
  onformdata: null
  ongotpointercapture: null
  onhashchange: null
  oninput: null
  oninvalid: null
  onkeydown: null
  onkeypress: null
  onkeyup: null
  onlanguagechange: null
  onload: null
  onloadeddata: null
  onloadedmetadata: null
  onloadstart: null
  onlostpointercapture: null
  onmessage: null
  onmessageerror: null
  onmousedown: null
  onmouseenter: null
  onmouseleave: null
  onmousemove: null
  onmouseout: null
  onmouseover: null
  onmouseup: null
  onmousewheel: null
  onoffline: null
  ononline: null
  onpagehide: null
  onpageshow: null
  onpause: null
  onplay: null
  onplaying: null
  onpointercancel: null
  onpointerdown: null
  onpointerenter: null
  onpointerleave: null
  onpointermove: null
  onpointerout: null
  onpointerover: null
  onpointerrawupdate: null
  onpointerup: null
  onpopstate: null
  onprogress: null
  onratechange: null
  onrejectionhandled: null
  onreset: null
  onresize: null
  onscroll: null
  onsearch: null
  onseeked: null
  onseeking: null
  onselect: null
  onselectionchange: null
  onselectstart: null
  onstalled: null
  onstorage: null
  onsubmit: null
  onsuspend: null
  ontimeupdate: null
  ontoggle: null
  ontransitioncancel: null
  ontransitionend: null
  ontransitionrun: null
  ontransitionstart: null
  onunhandledrejection: null
  onunload: ƒ ()
  onvolumechange: null
  onwaiting: null
  onwebkitanimationend: null
  onwebkitanimationiteration: null
  onwebkitanimationstart: null
  onwebkittransitionend: null
  onwheel: null
  open: ƒ open()
  openDatabase: ƒ openDatabase()
  opener: null
  origin: "https://www.yuque.com"
  outerHeight: 1057
  outerWidth: 1920
  pageXOffset: 0
  pageYOffset: 79
  parent: Window {0: global, window: Window, self: Window, document: document, name: "", location: Location, …}
  performance: Performance {timeOrigin: 1607566364768.991, onresourcetimingbufferfull: null, eventCounts: EventCounts, timing: PerformanceTiming, navigation: PerformanceNavigation, …}
  personalbar: BarProp {visible: true}
  plugins: (9) [ƒ, ƒ, ƒ, ƒ, ƒ, ƒ, ƒ, ƒ, ƒ]
  possibleBlock: ƒ R(e)
  possibleHeadedBlock: ƒ M(e)
  postMessage: ƒ postMessage()
  print: ƒ print()
  prompt: ƒ prompt()
  queueMicrotask: ƒ queueMicrotask()
  regeneratorRuntime: {wrap: ƒ, isGeneratorFunction: ƒ, mark: ƒ, awrap: ƒ, AsyncIterator: ƒ, …}
  releaseEvents: ƒ releaseEvents()
  requestAnimationFrame: ƒ requestAnimationFrame()
  requestIdleCallback: ƒ requestIdleCallback()
  resizeBy: ƒ resizeBy()
  resizeTo: ƒ resizeTo()
  resourceBaseUrl: "https://gw.alipayobjects.com/os/chair-script/skylark/"
  routerBase: "/"
  screen: Screen {availWidth: 1920, availHeight: 1057, width: 1920, height: 1080, colorDepth: 24, …}
  screenLeft: -1920
  screenTop: -204
  screenX: -1920
  screenY: -204
  scroll: ƒ scroll()
  scrollBy: ƒ scrollBy()
  scrollTo: ƒ scrollTo()
  scrollX: 0
  scrollY: 79
  scrollbars: BarProp {visible: true}
  self: Window {0: global, window: Window, self: Window, document: document, name: "", location: Location, …}
  sessionStorage: Storage {content-position-offset-15599731: "-95", length: 1}
  setInterval: ƒ setInterval()
  setTimeout: ƒ setTimeout()
  showDirectoryPicker: ƒ showDirectoryPicker()
  showOpenFilePicker: ƒ showOpenFilePicker()
  showSaveFilePicker: ƒ showSaveFilePicker()
  speechSynthesis: SpeechSynthesis {pending: false, speaking: false, paused: false, onvoiceschanged: null}
  sprintf: ƒ o(e)
  status: ""
  statusbar: BarProp {visible: true}
  stop: ƒ stop()
  styleMedia: StyleMedia {type: "screen"}
  toolbar: BarProp {visible: true}
  top: Window {0: global, window: Window, self: Window, document: document, name: "", location: Location, …}
  tracertCore: ƒ o()
  tracertMonitor: ƒ (t,e)
  tracertPluginAutoLogPv: ƒ (t,e)
  tracertPluginClickAndExpo: ƒ (t,n)
  tracertPluginClientSession: ƒ (e,n)
  tracertPluginFullfillRef: ƒ (t,e)
  tracertPluginLayout: ƒ (e,t)
  tracertPluginPerformance: ƒ (e,t)
  tracertPluginTimeOnPage: ƒ (t,e)
  tracertUtil: {CrossIframe: t, Cookies: ƒ, addEvent: ƒ, addMexOption: ƒ, addToExObj: ƒ, …}
  tracertWeb: ƒ (e,t)
  trustedTypes: TrustedTypePolicyFactory {emptyHTML: TrustedHTML, emptyScript: TrustedScript, defaultPolicy: null}
  visualViewport: VisualViewport {offsetLeft: 0, offsetTop: 0, pageLeft: 0, pageTop: 79, width: 771, …}
  vsprintf: ƒ i(e,t)
  webkitCancelAnimationFrame: ƒ webkitCancelAnimationFrame()
  webkitRequestAnimationFrame: ƒ webkitRequestAnimationFrame()
  webkitRequestFileSystem: ƒ webkitRequestFileSystem()
  webkitResolveLocalFileSystemURL: ƒ webkitResolveLocalFileSystemURL()
  webkitStorageInfo: DeprecatedStorageInfo {}
  webpackJsonp: (7) [Array(2), Array(2), Array(2), Array(2), Array(2), Array(2), Array(2), push: ƒ]
  win: Window {0: global, window: Window, self: Window, document: document, name: "", location: Location, …}
  window: Window {0: global, window: Window, self: Window, document: document, name: "", location: Location, …}
  yuyanMonitor: r {server: "https://mdap.alipay.com/loggw/dwcookieLogGet.do", userConfig: {…}, defaults: {…}, cOfflineVer: "", cAppId: "", …}
  _CNZZDbridge_1272061571: {bobject: p}
  __: ƒ (e,t)
  __SVG_SPRITE__: n {config: {…}, symbols: Array(13), _emitter: {…}, node: svg#__SVG_SPRITE_NODE__, _handleLocationChange: ƒ}
  ____lake_diagram_version: "2.0.0"
  ___uplaodFileHashMap: {}
  __core-js_shared__: {versions: Array(1), keys: {…}, wks: {…}}
  __engine: e {_allowDeferredRendering: true, readyStateManager: e, id: "contentView-yAupm", editArea: e, options: {…}, …}
  __imageBrowser: n {_events: o, _eventsCount: 3, options: {…}, images: Array(0), pswpDestroy: true, …}
  __lake_diagram_custom_clipboard_event: {clipboardData: {…}, preventDefault: ƒ}
  __member_message_ref: {current: i}
  __webpack_public_path__: "/os/chair-script/skylark/"
  __yuque_logger: {error: ƒ}
  _cz_account: "1272061571"
  _cz_loaded: {1272061571: 1}
  _czc: {push: ƒ}
  _getSelector: ƒ G(e,t)
  _isModal: ƒ q(e)
  _pickLayout: ƒ ie(e)
  Infinity: Infinity
  AbortController: ƒ AbortController()
  AbortSignal: ƒ AbortSignal()
  AbsoluteOrientationSensor: ƒ AbsoluteOrientationSensor()
  Accelerometer: ƒ Accelerometer()
  AggregateError: ƒ AggregateError()
  AnalyserNode: ƒ AnalyserNode()
  Animation: ƒ Animation()
  AnimationEffect: ƒ AnimationEffect()
  AnimationEvent: ƒ AnimationEvent()
  AnimationPlaybackEvent: ƒ AnimationPlaybackEvent()
  AnimationTimeline: ƒ AnimationTimeline()
  Array: ƒ Array()
  ArrayBuffer: ƒ ArrayBuffer()
  Atomics: Atomics {load: ƒ, store: ƒ, add: ƒ, sub: ƒ, and: ƒ, …}
  Attr: ƒ Attr()
  Audio: ƒ Audio()
  AudioBuffer: ƒ AudioBuffer()
  AudioBufferSourceNode: ƒ AudioBufferSourceNode()
  AudioContext: ƒ AudioContext()
  AudioDestinationNode: ƒ AudioDestinationNode()
  AudioListener: ƒ AudioListener()
  AudioNode: ƒ AudioNode()
  AudioParam: ƒ AudioParam()
  AudioParamMap: ƒ AudioParamMap()
  AudioProcessingEvent: ƒ AudioProcessingEvent()
  AudioScheduledSourceNode: ƒ AudioScheduledSourceNode()
  AudioWorklet: ƒ AudioWorklet()
  AudioWorkletNode: ƒ AudioWorkletNode()
  AuthenticatorAssertionResponse: ƒ AuthenticatorAssertionResponse()
  AuthenticatorAttestationResponse: ƒ AuthenticatorAttestationResponse()
  AuthenticatorResponse: ƒ AuthenticatorResponse()
  BackgroundFetchManager: ƒ BackgroundFetchManager()
  BackgroundFetchRecord: ƒ BackgroundFetchRecord()
  BackgroundFetchRegistration: ƒ BackgroundFetchRegistration()
  BarProp: ƒ BarProp()
  BarcodeDetector: ƒ BarcodeDetector()
  BaseAudioContext: ƒ BaseAudioContext()
  BatteryManager: ƒ BatteryManager()
  BeforeInstallPromptEvent: ƒ BeforeInstallPromptEvent()
  BeforeUnloadEvent: ƒ BeforeUnloadEvent()
  BigInt: ƒ BigInt()
  BigInt64Array: ƒ BigInt64Array()
  BigUint64Array: ƒ BigUint64Array()
  BiquadFilterNode: ƒ BiquadFilterNode()
  Blob: ƒ Blob()
  BlobEvent: ƒ BlobEvent()
  Bluetooth: ƒ Bluetooth()
  BluetoothCharacteristicProperties: ƒ BluetoothCharacteristicProperties()
  BluetoothDevice: ƒ BluetoothDevice()
  BluetoothRemoteGATTCharacteristic: ƒ BluetoothRemoteGATTCharacteristic()
  BluetoothRemoteGATTDescriptor: ƒ BluetoothRemoteGATTDescriptor()
  BluetoothRemoteGATTServer: ƒ BluetoothRemoteGATTServer()
  BluetoothRemoteGATTService: ƒ BluetoothRemoteGATTService()
  BluetoothUUID: ƒ BluetoothUUID()
  Boolean: ƒ Boolean()
  BroadcastChannel: ƒ BroadcastChannel()
  ByteLengthQueuingStrategy: ƒ ByteLengthQueuingStrategy()
  CDATASection: ƒ CDATASection()
  CSS: ƒ CSS()
  CSSAnimation: ƒ CSSAnimation()
  CSSConditionRule: ƒ CSSConditionRule()
  CSSFontFaceRule: ƒ CSSFontFaceRule()
  CSSGroupingRule: ƒ CSSGroupingRule()
  CSSImageValue: ƒ CSSImageValue()
  CSSImportRule: ƒ CSSImportRule()
  CSSKeyframeRule: ƒ CSSKeyframeRule()
  CSSKeyframesRule: ƒ CSSKeyframesRule()
  CSSKeywordValue: ƒ CSSKeywordValue()
  CSSMathInvert: ƒ CSSMathInvert()
  CSSMathMax: ƒ CSSMathMax()
  CSSMathMin: ƒ CSSMathMin()
  CSSMathNegate: ƒ CSSMathNegate()
  CSSMathProduct: ƒ CSSMathProduct()
  CSSMathSum: ƒ CSSMathSum()
  CSSMathValue: ƒ CSSMathValue()
  CSSMatrixComponent: ƒ CSSMatrixComponent()
  CSSMediaRule: ƒ CSSMediaRule()
  CSSNamespaceRule: ƒ CSSNamespaceRule()
  CSSNumericArray: ƒ CSSNumericArray()
  CSSNumericValue: ƒ CSSNumericValue()
  CSSPageRule: ƒ CSSPageRule()
  CSSPerspective: ƒ CSSPerspective()
  CSSPositionValue: ƒ CSSPositionValue()
  CSSPropertyRule: ƒ CSSPropertyRule()
  CSSRotate: ƒ CSSRotate()
  CSSRule: ƒ CSSRule()
  CSSRuleList: ƒ CSSRuleList()
  CSSScale: ƒ CSSScale()
  CSSSkew: ƒ CSSSkew()
  CSSSkewX: ƒ CSSSkewX()
  CSSSkewY: ƒ CSSSkewY()
  CSSStyleDeclaration: ƒ CSSStyleDeclaration()
  CSSStyleRule: ƒ CSSStyleRule()
  CSSStyleSheet: ƒ CSSStyleSheet()
  CSSStyleValue: ƒ CSSStyleValue()
  CSSSupportsRule: ƒ CSSSupportsRule()
  CSSTransformComponent: ƒ CSSTransformComponent()
  CSSTransformValue: ƒ CSSTransformValue()
  CSSTransition: ƒ CSSTransition()
  CSSTranslate: ƒ CSSTranslate()
  CSSUnitValue: ƒ CSSUnitValue()
  CSSUnparsedValue: ƒ CSSUnparsedValue()
  CSSVariableReferenceValue: ƒ CSSVariableReferenceValue()
  Cache: ƒ Cache()
  CacheStorage: ƒ CacheStorage()
  CanvasCaptureMediaStreamTrack: ƒ CanvasCaptureMediaStreamTrack()
  CanvasGradient: ƒ CanvasGradient()
  CanvasPattern: ƒ CanvasPattern()
  CanvasRenderingContext2D: ƒ CanvasRenderingContext2D()
  ChannelMergerNode: ƒ ChannelMergerNode()
  ChannelSplitterNode: ƒ ChannelSplitterNode()
  CharacterData: ƒ CharacterData()
  Clipboard: ƒ Clipboard()
  ClipboardEvent: ƒ ClipboardEvent()
  ClipboardItem: ƒ ClipboardItem()
  CloseEvent: ƒ CloseEvent()
  Comment: ƒ Comment()
  CompositionEvent: ƒ CompositionEvent()
  CompressionStream: ƒ CompressionStream()
  ConstantSourceNode: ƒ ConstantSourceNode()
  ConvolverNode: ƒ ConvolverNode()
  CookieChangeEvent: ƒ CookieChangeEvent()
  CookieStore: ƒ CookieStore()
  CookieStoreManager: ƒ CookieStoreManager()
  CountQueuingStrategy: ƒ CountQueuingStrategy()
  Credential: ƒ Credential()
  CredentialsContainer: ƒ CredentialsContainer()
  Crypto: ƒ Crypto()
  CryptoKey: ƒ CryptoKey()
  CustomElementRegistry: ƒ CustomElementRegistry()
  CustomEvent: ƒ CustomEvent()
  DOMError: ƒ DOMError()
  DOMException: ƒ DOMException()
  DOMImplementation: ƒ DOMImplementation()
  DOMMatrix: ƒ DOMMatrix()
  DOMMatrixReadOnly: ƒ DOMMatrixReadOnly()
  DOMParser: ƒ DOMParser()
  DOMPoint: ƒ DOMPoint()
  DOMPointReadOnly: ƒ DOMPointReadOnly()
  DOMQuad: ƒ DOMQuad()
  DOMRect: ƒ DOMRect()
  DOMRectList: ƒ DOMRectList()
  DOMRectReadOnly: ƒ DOMRectReadOnly()
  DOMStringList: ƒ DOMStringList()
  DOMStringMap: ƒ DOMStringMap()
  DOMTokenList: ƒ DOMTokenList()
  DataTransfer: ƒ DataTransfer()
  DataTransferItem: ƒ DataTransferItem()
  DataTransferItemList: ƒ DataTransferItemList()
  DataView: ƒ DataView()
  Date: ƒ Date()
  DecompressionStream: ƒ DecompressionStream()
  DelayNode: ƒ DelayNode()
  DeviceMotionEvent: ƒ DeviceMotionEvent()
  DeviceMotionEventAcceleration: ƒ DeviceMotionEventAcceleration()
  DeviceMotionEventRotationRate: ƒ DeviceMotionEventRotationRate()
  DeviceOrientationEvent: ƒ DeviceOrientationEvent()
  Document: ƒ Document()
  DocumentFragment: ƒ DocumentFragment()
  DocumentTimeline: ƒ DocumentTimeline()
  DocumentType: ƒ DocumentType()
  DragEvent: ƒ DragEvent()
  DynamicsCompressorNode: ƒ DynamicsCompressorNode()
  Element: ƒ Element()
  ElementInternals: ƒ ElementInternals()
  Error: ƒ Error()
  ErrorEvent: ƒ ErrorEvent()
  EvalError: ƒ EvalError()
  Event: ƒ Event()
  EventCounts: ƒ EventCounts()
  EventSource: ƒ EventSource()
  EventTarget: ƒ EventTarget()
  External: ƒ External()
  FeaturePolicy: ƒ FeaturePolicy()
  FederatedCredential: ƒ FederatedCredential()
  File: ƒ File()
  FileList: ƒ FileList()
  FileReader: ƒ FileReader()
  FileSystemDirectoryHandle: ƒ FileSystemDirectoryHandle()
  FileSystemFileHandle: ƒ FileSystemFileHandle()
  FileSystemHandle: ƒ FileSystemHandle()
  FileSystemWritableFileStream: ƒ FileSystemWritableFileStream()
  FinalizationRegistry: ƒ FinalizationRegistry()
  Float32Array: ƒ Float32Array()
  Float64Array: ƒ Float64Array()
  FocusEvent: ƒ FocusEvent()
  FontFace: ƒ FontFace()
  FontFaceSetLoadEvent: ƒ FontFaceSetLoadEvent()
  FormData: ƒ FormData()
  FormDataEvent: ƒ FormDataEvent()
  FragmentDirective: ƒ FragmentDirective()
  Function: ƒ Function()
  GainNode: ƒ GainNode()
  Gamepad: ƒ Gamepad()
  GamepadButton: ƒ GamepadButton()
  GamepadEvent: ƒ GamepadEvent()
  GamepadHapticActuator: ƒ GamepadHapticActuator()
  Geolocation: ƒ Geolocation()
  GeolocationCoordinates: ƒ GeolocationCoordinates()
  GeolocationPosition: ƒ GeolocationPosition()
  GeolocationPositionError: ƒ GeolocationPositionError()
  Gyroscope: ƒ Gyroscope()
  HTMLAllCollection: ƒ HTMLAllCollection()
  HTMLAnchorElement: ƒ HTMLAnchorElement()
  HTMLAreaElement: ƒ HTMLAreaElement()
  HTMLAudioElement: ƒ HTMLAudioElement()
  HTMLBRElement: ƒ HTMLBRElement()
  HTMLBaseElement: ƒ HTMLBaseElement()
  HTMLBodyElement: ƒ HTMLBodyElement()
  HTMLButtonElement: ƒ HTMLButtonElement()
  HTMLCanvasElement: ƒ HTMLCanvasElement()
  HTMLCollection: ƒ HTMLCollection()
  HTMLContentElement: ƒ HTMLContentElement()
  HTMLDListElement: ƒ HTMLDListElement()
  HTMLDataElement: ƒ HTMLDataElement()
  HTMLDataListElement: ƒ HTMLDataListElement()
  HTMLDetailsElement: ƒ HTMLDetailsElement()
  HTMLDialogElement: ƒ HTMLDialogElement()
  HTMLDirectoryElement: ƒ HTMLDirectoryElement()
  HTMLDivElement: ƒ HTMLDivElement()
  HTMLDocument: ƒ HTMLDocument()
  HTMLElement: ƒ HTMLElement()
  HTMLEmbedElement: ƒ HTMLEmbedElement()
  HTMLFieldSetElement: ƒ HTMLFieldSetElement()
  HTMLFontElement: ƒ HTMLFontElement()
  HTMLFormControlsCollection: ƒ HTMLFormControlsCollection()
  HTMLFormElement: ƒ HTMLFormElement()
  HTMLFrameElement: ƒ HTMLFrameElement()
  HTMLFrameSetElement: ƒ HTMLFrameSetElement()
  HTMLHRElement: ƒ HTMLHRElement()
  HTMLHeadElement: ƒ HTMLHeadElement()
  HTMLHeadingElement: ƒ HTMLHeadingElement()
  HTMLHtmlElement: ƒ HTMLHtmlElement()
  HTMLIFrameElement: ƒ HTMLIFrameElement()
  HTMLImageElement: ƒ HTMLImageElement()
  HTMLInputElement: ƒ HTMLInputElement()
  HTMLLIElement: ƒ HTMLLIElement()
  HTMLLabelElement: ƒ HTMLLabelElement()
  HTMLLegendElement: ƒ HTMLLegendElement()
  HTMLLinkElement: ƒ HTMLLinkElement()
  HTMLMapElement: ƒ HTMLMapElement()
  HTMLMarqueeElement: ƒ HTMLMarqueeElement()
  HTMLMediaElement: ƒ HTMLMediaElement()
  HTMLMenuElement: ƒ HTMLMenuElement()
  HTMLMetaElement: ƒ HTMLMetaElement()
  HTMLMeterElement: ƒ HTMLMeterElement()
  HTMLModElement: ƒ HTMLModElement()
  HTMLOListElement: ƒ HTMLOListElement()
  HTMLObjectElement: ƒ HTMLObjectElement()
  HTMLOptGroupElement: ƒ HTMLOptGroupElement()
  HTMLOptionElement: ƒ HTMLOptionElement()
  HTMLOptionsCollection: ƒ HTMLOptionsCollection()
  HTMLOutputElement: ƒ HTMLOutputElement()
  HTMLParagraphElement: ƒ HTMLParagraphElement()
  HTMLParamElement: ƒ HTMLParamElement()
  HTMLPictureElement: ƒ HTMLPictureElement()
  HTMLPreElement: ƒ HTMLPreElement()
  HTMLProgressElement: ƒ HTMLProgressElement()
  HTMLQuoteElement: ƒ HTMLQuoteElement()
  HTMLScriptElement: ƒ HTMLScriptElement()
  HTMLSelectElement: ƒ HTMLSelectElement()
  HTMLShadowElement: ƒ HTMLShadowElement()
  HTMLSlotElement: ƒ HTMLSlotElement()
  HTMLSourceElement: ƒ HTMLSourceElement()
  HTMLSpanElement: ƒ HTMLSpanElement()
  HTMLStyleElement: ƒ HTMLStyleElement()
  HTMLTableCaptionElement: ƒ HTMLTableCaptionElement()
  HTMLTableCellElement: ƒ HTMLTableCellElement()
  HTMLTableColElement: ƒ HTMLTableColElement()
  HTMLTableElement: ƒ HTMLTableElement()
  HTMLTableRowElement: ƒ HTMLTableRowElement()
  HTMLTableSectionElement: ƒ HTMLTableSectionElement()
  HTMLTemplateElement: ƒ HTMLTemplateElement()
  HTMLTextAreaElement: ƒ HTMLTextAreaElement()
  HTMLTimeElement: ƒ HTMLTimeElement()
  HTMLTitleElement: ƒ HTMLTitleElement()
  HTMLTrackElement: ƒ HTMLTrackElement()
  HTMLUListElement: ƒ HTMLUListElement()
  HTMLUnknownElement: ƒ HTMLUnknownElement()
  HTMLVideoElement: ƒ HTMLVideoElement()
  HashChangeEvent: ƒ HashChangeEvent()
  Headers: ƒ Headers()
  History: ƒ History()
  IDBCursor: ƒ IDBCursor()
  IDBCursorWithValue: ƒ IDBCursorWithValue()
  IDBDatabase: ƒ IDBDatabase()
  IDBFactory: ƒ IDBFactory()
  IDBIndex: ƒ IDBIndex()
  IDBKeyRange: ƒ IDBKeyRange()
  IDBObjectStore: ƒ IDBObjectStore()
  IDBOpenDBRequest: ƒ IDBOpenDBRequest()
  IDBRequest: ƒ IDBRequest()
  IDBTransaction: ƒ IDBTransaction()
  IDBVersionChangeEvent: ƒ IDBVersionChangeEvent()
  IIRFilterNode: ƒ IIRFilterNode()
  IdleDeadline: ƒ IdleDeadline()
  Image: ƒ Image()
  ImageBitmap: ƒ ImageBitmap()
  ImageBitmapRenderingContext: ƒ ImageBitmapRenderingContext()
  ImageCapture: ƒ ImageCapture()
  ImageData: ƒ ImageData()
  InputDeviceCapabilities: ƒ InputDeviceCapabilities()
  InputDeviceInfo: ƒ InputDeviceInfo()
  InputEvent: ƒ InputEvent()
  Int8Array: ƒ Int8Array()
  Int16Array: ƒ Int16Array()
  Int32Array: ƒ Int32Array()
  IntersectionObserver: ƒ IntersectionObserver()
  IntersectionObserverEntry: ƒ IntersectionObserverEntry()
  Intl: Intl {getCanonicalLocales: ƒ, DateTimeFormat: ƒ, NumberFormat: ƒ, Collator: ƒ, v8BreakIterator: ƒ, …}
  JSON: JSON {Symbol(Symbol.toStringTag): "JSON", parse: ƒ, stringify: ƒ}
  Keyboard: ƒ Keyboard()
  KeyboardEvent: ƒ KeyboardEvent()
  KeyboardLayoutMap: ƒ KeyboardLayoutMap()
  KeyframeEffect: ƒ KeyframeEffect()
  LargestContentfulPaint: ƒ LargestContentfulPaint()
  LayoutShift: ƒ LayoutShift()
  LayoutShiftAttribution: ƒ LayoutShiftAttribution()
  LinearAccelerationSensor: ƒ LinearAccelerationSensor()
  Location: ƒ Location()
  Lock: ƒ Lock()
  LockManager: ƒ LockManager()
  MIDIAccess: ƒ MIDIAccess()
  MIDIConnectionEvent: ƒ MIDIConnectionEvent()
  MIDIInput: ƒ MIDIInput()
  MIDIInputMap: ƒ MIDIInputMap()
  MIDIMessageEvent: ƒ MIDIMessageEvent()
  MIDIOutput: ƒ MIDIOutput()
  MIDIOutputMap: ƒ MIDIOutputMap()
  MIDIPort: ƒ MIDIPort()
  Map: ƒ Map()
  Math: Math {abs: ƒ, acos: ƒ, acosh: ƒ, asin: ƒ, asinh: ƒ, …}
  MediaCapabilities: ƒ MediaCapabilities()
  MediaDeviceInfo: ƒ MediaDeviceInfo()
  MediaDevices: ƒ MediaDevices()
  MediaElementAudioSourceNode: ƒ MediaElementAudioSourceNode()
  MediaEncryptedEvent: ƒ MediaEncryptedEvent()
  MediaError: ƒ MediaError()
  MediaKeyMessageEvent: ƒ MediaKeyMessageEvent()
  MediaKeySession: ƒ MediaKeySession()
  MediaKeyStatusMap: ƒ MediaKeyStatusMap()
  MediaKeySystemAccess: ƒ MediaKeySystemAccess()
  MediaKeys: ƒ MediaKeys()
  MediaList: ƒ MediaList()
  MediaMetadata: ƒ MediaMetadata()
  MediaQueryList: ƒ MediaQueryList()
  MediaQueryListEvent: ƒ MediaQueryListEvent()
  MediaRecorder: ƒ MediaRecorder()
  MediaSession: ƒ MediaSession()
  MediaSource: ƒ MediaSource()
  MediaStream: ƒ MediaStream()
  MediaStreamAudioDestinationNode: ƒ MediaStreamAudioDestinationNode()
  MediaStreamAudioSourceNode: ƒ MediaStreamAudioSourceNode()
  MediaStreamEvent: ƒ MediaStreamEvent()
  MediaStreamTrack: ƒ MediaStreamTrack()
  MediaStreamTrackEvent: ƒ MediaStreamTrackEvent()
  MessageChannel: ƒ MessageChannel()
  MessageEvent: ƒ MessageEvent()
  MessagePort: ƒ MessagePort()
  MimeType: ƒ MimeType()
  MimeTypeArray: ƒ MimeTypeArray()
  MouseEvent: ƒ MouseEvent()
  MutationEvent: ƒ MutationEvent()
  MutationObserver: ƒ MutationObserver()
  MutationRecord: ƒ MutationRecord()
  NaN: NaN
  NamedNodeMap: ƒ NamedNodeMap()
  NavigationPreloadManager: ƒ NavigationPreloadManager()
  Navigator: ƒ Navigator()
  NavigatorUAData: ƒ NavigatorUAData()
  NetworkInformation: ƒ NetworkInformation()
  Node: ƒ Node()
  NodeFilter: ƒ NodeFilter()
  NodeIterator: ƒ NodeIterator()
  NodeList: ƒ NodeList()
  Notification: ƒ Notification()
  Number: ƒ Number()
  Object: ƒ Object()
  OfflineAudioCompletionEvent: ƒ OfflineAudioCompletionEvent()
  OfflineAudioContext: ƒ OfflineAudioContext()
  OffscreenCanvas: ƒ OffscreenCanvas()
  OffscreenCanvasRenderingContext2D: ƒ OffscreenCanvasRenderingContext2D()
  Option: ƒ Option()
  OrientationSensor: ƒ OrientationSensor()
  OscillatorNode: ƒ OscillatorNode()
  OverconstrainedError: ƒ OverconstrainedError()
  PageTransitionEvent: ƒ PageTransitionEvent()
  PannerNode: ƒ PannerNode()
  PasswordCredential: ƒ PasswordCredential()
  Path2D: ƒ Path2D()
  PaymentAddress: ƒ PaymentAddress()
  PaymentInstruments: ƒ PaymentInstruments()
  PaymentManager: ƒ PaymentManager()
  PaymentMethodChangeEvent: ƒ PaymentMethodChangeEvent()
  PaymentRequest: ƒ PaymentRequest()
  PaymentRequestUpdateEvent: ƒ PaymentRequestUpdateEvent()
  PaymentResponse: ƒ PaymentResponse()
  Performance: ƒ Performance()
  PerformanceElementTiming: ƒ PerformanceElementTiming()
  PerformanceEntry: ƒ PerformanceEntry()
  PerformanceEventTiming: ƒ PerformanceEventTiming()
  PerformanceLongTaskTiming: ƒ PerformanceLongTaskTiming()
  PerformanceMark: ƒ PerformanceMark()
  PerformanceMeasure: ƒ PerformanceMeasure()
  PerformanceNavigation: ƒ PerformanceNavigation()
  PerformanceNavigationTiming: ƒ PerformanceNavigationTiming()
  PerformanceObserver: ƒ PerformanceObserver()
  PerformanceObserverEntryList: ƒ PerformanceObserverEntryList()
  PerformancePaintTiming: ƒ PerformancePaintTiming()
  PerformanceResourceTiming: ƒ PerformanceResourceTiming()
  PerformanceServerTiming: ƒ PerformanceServerTiming()
  PerformanceTiming: ƒ PerformanceTiming()
  PeriodicSyncManager: ƒ PeriodicSyncManager()
  PeriodicWave: ƒ PeriodicWave()
  PermissionStatus: ƒ PermissionStatus()
  Permissions: ƒ Permissions()
  PictureInPictureEvent: ƒ PictureInPictureEvent()
  PictureInPictureWindow: ƒ PictureInPictureWindow()
  Plugin: ƒ Plugin()
  PluginArray: ƒ PluginArray()
  PointerEvent: ƒ PointerEvent()
  PopStateEvent: ƒ PopStateEvent()
  Presentation: ƒ Presentation()
  PresentationAvailability: ƒ PresentationAvailability()
  PresentationConnection: ƒ PresentationConnection()
  PresentationConnectionAvailableEvent: ƒ PresentationConnectionAvailableEvent()
  PresentationConnectionCloseEvent: ƒ PresentationConnectionCloseEvent()
  PresentationConnectionList: ƒ PresentationConnectionList()
  PresentationReceiver: ƒ PresentationReceiver()
  PresentationRequest: ƒ PresentationRequest()
  ProcessingInstruction: ƒ ProcessingInstruction()
  ProgressEvent: ƒ ProgressEvent()
  Promise: ƒ Promise()
  PromiseRejectionEvent: ƒ PromiseRejectionEvent()
  Proxy: ƒ Proxy()
  PublicKeyCredential: ƒ PublicKeyCredential()
  PushManager: ƒ PushManager()
  PushSubscription: ƒ PushSubscription()
  PushSubscriptionOptions: ƒ PushSubscriptionOptions()
  RTCCertificate: ƒ RTCCertificate()
  RTCDTMFSender: ƒ RTCDTMFSender()
  RTCDTMFToneChangeEvent: ƒ RTCDTMFToneChangeEvent()
  RTCDataChannel: ƒ RTCDataChannel()
  RTCDataChannelEvent: ƒ RTCDataChannelEvent()
  RTCDtlsTransport: ƒ RTCDtlsTransport()
  RTCEncodedAudioFrame: ƒ RTCEncodedAudioFrame()
  RTCEncodedVideoFrame: ƒ RTCEncodedVideoFrame()
  RTCError: ƒ RTCError()
  RTCErrorEvent: ƒ RTCErrorEvent()
  RTCIceCandidate: ƒ RTCIceCandidate()
  RTCIceTransport: ƒ RTCIceTransport()
  RTCPeerConnection: ƒ RTCPeerConnection()
  RTCPeerConnectionIceErrorEvent: ƒ RTCPeerConnectionIceErrorEvent()
  RTCPeerConnectionIceEvent: ƒ RTCPeerConnectionIceEvent()
  RTCRtpReceiver: ƒ RTCRtpReceiver()
  RTCRtpSender: ƒ RTCRtpSender()
  RTCRtpTransceiver: ƒ RTCRtpTransceiver()
  RTCSctpTransport: ƒ RTCSctpTransport()
  RTCSessionDescription: ƒ RTCSessionDescription()
  RTCStatsReport: ƒ RTCStatsReport()
  RTCTrackEvent: ƒ RTCTrackEvent()
  RadioNodeList: ƒ RadioNodeList()
  Range: ƒ Range()
  RangeError: ƒ RangeError()
  ReadableStream: ƒ ReadableStream()
  ReadableStreamDefaultReader: ƒ ReadableStreamDefaultReader()
  ReferenceError: ƒ ReferenceError()
  Reflect: Reflect {defineProperty: ƒ, deleteProperty: ƒ, apply: ƒ, construct: ƒ, get: ƒ, …}
  RegExp: ƒ RegExp()
  RelativeOrientationSensor: ƒ RelativeOrientationSensor()
  RemotePlayback: ƒ RemotePlayback()
  ReportingObserver: ƒ ReportingObserver()
  Request: ƒ Request()
  ResizeObserver: ƒ ResizeObserver()
  ResizeObserverEntry: ƒ ResizeObserverEntry()
  ResizeObserverSize: ƒ ResizeObserverSize()
  Response: ƒ Response()
  SVGAElement: ƒ SVGAElement()
  SVGAngle: ƒ SVGAngle()
  SVGAnimateElement: ƒ SVGAnimateElement()
  SVGAnimateMotionElement: ƒ SVGAnimateMotionElement()
  SVGAnimateTransformElement: ƒ SVGAnimateTransformElement()
  SVGAnimatedAngle: ƒ SVGAnimatedAngle()
  SVGAnimatedBoolean: ƒ SVGAnimatedBoolean()
  SVGAnimatedEnumeration: ƒ SVGAnimatedEnumeration()
  SVGAnimatedInteger: ƒ SVGAnimatedInteger()
  SVGAnimatedLength: ƒ SVGAnimatedLength()
  SVGAnimatedLengthList: ƒ SVGAnimatedLengthList()
  SVGAnimatedNumber: ƒ SVGAnimatedNumber()
  SVGAnimatedNumberList: ƒ SVGAnimatedNumberList()
  SVGAnimatedPreserveAspectRatio: ƒ SVGAnimatedPreserveAspectRatio()
  SVGAnimatedRect: ƒ SVGAnimatedRect()
  SVGAnimatedString: ƒ SVGAnimatedString()
  SVGAnimatedTransformList: ƒ SVGAnimatedTransformList()
  SVGAnimationElement: ƒ SVGAnimationElement()
  SVGCircleElement: ƒ SVGCircleElement()
  SVGClipPathElement: ƒ SVGClipPathElement()
  SVGComponentTransferFunctionElement: ƒ SVGComponentTransferFunctionElement()
  SVGDefsElement: ƒ SVGDefsElement()
  SVGDescElement: ƒ SVGDescElement()
  SVGElement: ƒ SVGElement()
  SVGEllipseElement: ƒ SVGEllipseElement()
  SVGFEBlendElement: ƒ SVGFEBlendElement()
  SVGFEColorMatrixElement: ƒ SVGFEColorMatrixElement()
  SVGFEComponentTransferElement: ƒ SVGFEComponentTransferElement()
  SVGFECompositeElement: ƒ SVGFECompositeElement()
  SVGFEConvolveMatrixElement: ƒ SVGFEConvolveMatrixElement()
  SVGFEDiffuseLightingElement: ƒ SVGFEDiffuseLightingElement()
  SVGFEDisplacementMapElement: ƒ SVGFEDisplacementMapElement()
  SVGFEDistantLightElement: ƒ SVGFEDistantLightElement()
  SVGFEDropShadowElement: ƒ SVGFEDropShadowElement()
  SVGFEFloodElement: ƒ SVGFEFloodElement()
  SVGFEFuncAElement: ƒ SVGFEFuncAElement()
  SVGFEFuncBElement: ƒ SVGFEFuncBElement()
  SVGFEFuncGElement: ƒ SVGFEFuncGElement()
  SVGFEFuncRElement: ƒ SVGFEFuncRElement()
  SVGFEGaussianBlurElement: ƒ SVGFEGaussianBlurElement()
  SVGFEImageElement: ƒ SVGFEImageElement()
  SVGFEMergeElement: ƒ SVGFEMergeElement()
  SVGFEMergeNodeElement: ƒ SVGFEMergeNodeElement()
  SVGFEMorphologyElement: ƒ SVGFEMorphologyElement()
  SVGFEOffsetElement: ƒ SVGFEOffsetElement()
  SVGFEPointLightElement: ƒ SVGFEPointLightElement()
  SVGFESpecularLightingElement: ƒ SVGFESpecularLightingElement()
  SVGFESpotLightElement: ƒ SVGFESpotLightElement()
  SVGFETileElement: ƒ SVGFETileElement()
  SVGFETurbulenceElement: ƒ SVGFETurbulenceElement()
  SVGFilterElement: ƒ SVGFilterElement()
  SVGForeignObjectElement: ƒ SVGForeignObjectElement()
  SVGGElement: ƒ SVGGElement()
  SVGGeometryElement: ƒ SVGGeometryElement()
  SVGGradientElement: ƒ SVGGradientElement()
  SVGGraphicsElement: ƒ SVGGraphicsElement()
  SVGImageElement: ƒ SVGImageElement()
  SVGLength: ƒ SVGLength()
  SVGLengthList: ƒ SVGLengthList()
  SVGLineElement: ƒ SVGLineElement()
  SVGLinearGradientElement: ƒ SVGLinearGradientElement()
  SVGMPathElement: ƒ SVGMPathElement()
  SVGMarkerElement: ƒ SVGMarkerElement()
  SVGMaskElement: ƒ SVGMaskElement()
  SVGMatrix: ƒ SVGMatrix()
  SVGMetadataElement: ƒ SVGMetadataElement()
  SVGNumber: ƒ SVGNumber()
  SVGNumberList: ƒ SVGNumberList()
  SVGPathElement: ƒ SVGPathElement()
  SVGPatternElement: ƒ SVGPatternElement()
  SVGPoint: ƒ SVGPoint()
  SVGPointList: ƒ SVGPointList()
  SVGPolygonElement: ƒ SVGPolygonElement()
  SVGPolylineElement: ƒ SVGPolylineElement()
  SVGPreserveAspectRatio: ƒ SVGPreserveAspectRatio()
  SVGRadialGradientElement: ƒ SVGRadialGradientElement()
  SVGRect: ƒ SVGRect()
  SVGRectElement: ƒ SVGRectElement()
  SVGSVGElement: ƒ SVGSVGElement()
  SVGScriptElement: ƒ SVGScriptElement()
  SVGSetElement: ƒ SVGSetElement()
  SVGStopElement: ƒ SVGStopElement()
  SVGStringList: ƒ SVGStringList()
  SVGStyleElement: ƒ SVGStyleElement()
  SVGSwitchElement: ƒ SVGSwitchElement()
  SVGSymbolElement: ƒ SVGSymbolElement()
  SVGTSpanElement: ƒ SVGTSpanElement()
  SVGTextContentElement: ƒ SVGTextContentElement()
  SVGTextElement: ƒ SVGTextElement()
  SVGTextPathElement: ƒ SVGTextPathElement()
  SVGTextPositioningElement: ƒ SVGTextPositioningElement()
  SVGTitleElement: ƒ SVGTitleElement()
  SVGTransform: ƒ SVGTransform()
  SVGTransformList: ƒ SVGTransformList()
  SVGUnitTypes: ƒ SVGUnitTypes()
  SVGUseElement: ƒ SVGUseElement()
  SVGViewElement: ƒ SVGViewElement()
  Scheduling: ƒ Scheduling()
  Screen: ƒ Screen()
  ScreenOrientation: ƒ ScreenOrientation()
  ScriptProcessorNode: ƒ ScriptProcessorNode()
  SecurityPolicyViolationEvent: ƒ SecurityPolicyViolationEvent()
  Selection: ƒ Selection()
  Sensor: ƒ Sensor()
  SensorErrorEvent: ƒ SensorErrorEvent()
  ServiceWorker: ƒ ServiceWorker()
  ServiceWorkerContainer: ƒ ServiceWorkerContainer()
  ServiceWorkerRegistration: ƒ ServiceWorkerRegistration()
  Set: ƒ Set()
  ShadowRoot: ƒ ShadowRoot()
  SharedArrayBuffer: ƒ SharedArrayBuffer()
  SharedWorker: ƒ SharedWorker()
  SourceBuffer: ƒ SourceBuffer()
  SourceBufferList: ƒ SourceBufferList()
  SpeechSynthesisErrorEvent: ƒ SpeechSynthesisErrorEvent()
  SpeechSynthesisEvent: ƒ SpeechSynthesisEvent()
  SpeechSynthesisUtterance: ƒ SpeechSynthesisUtterance()
  StaticRange: ƒ StaticRange()
  StereoPannerNode: ƒ StereoPannerNode()
  Storage: ƒ Storage()
  StorageEvent: ƒ StorageEvent()
  StorageManager: ƒ StorageManager()
  String: ƒ String()
  StylePropertyMap: ƒ StylePropertyMap()
  StylePropertyMapReadOnly: ƒ StylePropertyMapReadOnly()
  StyleSheet: ƒ StyleSheet()
  StyleSheetList: ƒ StyleSheetList()
  SubmitEvent: ƒ SubmitEvent()
  SubtleCrypto: ƒ SubtleCrypto()
  Symbol: ƒ Symbol()
  SyncManager: ƒ SyncManager()
  SyntaxError: ƒ SyntaxError()
  TaskAttributionTiming: ƒ TaskAttributionTiming()
  Text: ƒ Text()
  TextDecoder: ƒ TextDecoder()
  TextDecoderStream: ƒ TextDecoderStream()
  TextEncoder: ƒ TextEncoder()
  TextEncoderStream: ƒ TextEncoderStream()
  TextEvent: ƒ TextEvent()
  TextMetrics: ƒ TextMetrics()
  TextTrack: ƒ TextTrack()
  TextTrackCue: ƒ TextTrackCue()
  TextTrackCueList: ƒ TextTrackCueList()
  TextTrackList: ƒ TextTrackList()
  TimeRanges: ƒ TimeRanges()
  Touch: ƒ Touch()
  TouchEvent: ƒ TouchEvent()
  TouchList: ƒ TouchList()
  TrackEvent: ƒ TrackEvent()
  TransformStream: ƒ TransformStream()
  TransitionEvent: ƒ TransitionEvent()
  TreeWalker: ƒ TreeWalker()
  TrustedHTML: ƒ TrustedHTML()
  TrustedScript: ƒ TrustedScript()
  TrustedScriptURL: ƒ TrustedScriptURL()
  TrustedTypePolicy: ƒ TrustedTypePolicy()
  TrustedTypePolicyFactory: ƒ TrustedTypePolicyFactory()
  TypeError: ƒ TypeError()
  UIEvent: ƒ UIEvent()
  URIError: ƒ URIError()
  URL: ƒ URL()
  URLSearchParams: ƒ URLSearchParams()
  USB: ƒ USB()
  USBAlternateInterface: ƒ USBAlternateInterface()
  USBConfiguration: ƒ USBConfiguration()
  USBConnectionEvent: ƒ USBConnectionEvent()
  USBDevice: ƒ USBDevice()
  USBEndpoint: ƒ USBEndpoint()
  USBInTransferResult: ƒ USBInTransferResult()
  USBInterface: ƒ USBInterface()
  USBIsochronousInTransferPacket: ƒ USBIsochronousInTransferPacket()
  USBIsochronousInTransferResult: ƒ USBIsochronousInTransferResult()
  USBIsochronousOutTransferPacket: ƒ USBIsochronousOutTransferPacket()
  USBIsochronousOutTransferResult: ƒ USBIsochronousOutTransferResult()
  USBOutTransferResult: ƒ USBOutTransferResult()
  Uint8Array: ƒ Uint8Array()
  Uint8ClampedArray: ƒ Uint8ClampedArray()
  Uint16Array: ƒ Uint16Array()
  Uint32Array: ƒ Uint32Array()
  UserActivation: ƒ UserActivation()
  VTTCue: ƒ VTTCue()
  ValidityState: ƒ ValidityState()
  VideoPlaybackQuality: ƒ VideoPlaybackQuality()
  VisualViewport: ƒ VisualViewport()
  WakeLock: ƒ WakeLock()
  WakeLockSentinel: ƒ WakeLockSentinel()
  WaveShaperNode: ƒ WaveShaperNode()
  WeakMap: ƒ WeakMap()
  WeakRef: ƒ WeakRef()
  WeakSet: ƒ WeakSet()
  WebAssembly: WebAssembly {compile: ƒ, validate: ƒ, instantiate: ƒ, compileStreaming: ƒ, instantiateStreaming: ƒ, …}
  WebGL2RenderingContext: ƒ WebGL2RenderingContext()
  WebGLActiveInfo: ƒ WebGLActiveInfo()
  WebGLBuffer: ƒ WebGLBuffer()
  WebGLContextEvent: ƒ WebGLContextEvent()
  WebGLFramebuffer: ƒ WebGLFramebuffer()
  WebGLProgram: ƒ WebGLProgram()
  WebGLQuery: ƒ WebGLQuery()
  WebGLRenderbuffer: ƒ WebGLRenderbuffer()
  WebGLRenderingContext: ƒ WebGLRenderingContext()
  WebGLSampler: ƒ WebGLSampler()
  WebGLShader: ƒ WebGLShader()
  WebGLShaderPrecisionFormat: ƒ WebGLShaderPrecisionFormat()
  WebGLSync: ƒ WebGLSync()
  WebGLTexture: ƒ WebGLTexture()
  WebGLTransformFeedback: ƒ WebGLTransformFeedback()
  WebGLUniformLocation: ƒ WebGLUniformLocation()
  WebGLVertexArrayObject: ƒ WebGLVertexArrayObject()
  WebKitCSSMatrix: ƒ DOMMatrix()
  WebKitMutationObserver: ƒ MutationObserver()
  WebSocket: ƒ WebSocket()
  WheelEvent: ƒ WheelEvent()
  Window: ƒ Window()
  Worker: ƒ Worker()
  Worklet: ƒ Worklet()
  WritableStream: ƒ WritableStream()
  WritableStreamDefaultWriter: ƒ WritableStreamDefaultWriter()
  XMLDocument: ƒ XMLDocument()
  XMLHttpRequest: ƒ XMLHttpRequest()
  XMLHttpRequestEventTarget: ƒ XMLHttpRequestEventTarget()
  XMLHttpRequestUpload: ƒ XMLHttpRequestUpload()
  XMLSerializer: ƒ XMLSerializer()
  XPathEvaluator: ƒ XPathEvaluator()
  XPathExpression: ƒ XPathExpression()
  XPathResult: ƒ XPathResult()
  XRAnchor: ƒ XRAnchor()
  XRAnchorSet: ƒ XRAnchorSet()
  XRBoundedReferenceSpace: ƒ XRBoundedReferenceSpace()
  XRDOMOverlayState: ƒ XRDOMOverlayState()
  XRFrame: ƒ XRFrame()
  XRHitTestResult: ƒ XRHitTestResult()
  XRHitTestSource: ƒ XRHitTestSource()
  XRInputSource: ƒ XRInputSource()
  XRInputSourceArray: ƒ XRInputSourceArray()
  XRInputSourceEvent: ƒ XRInputSourceEvent()
  XRInputSourcesChangeEvent: ƒ XRInputSourcesChangeEvent()
  XRLayer: ƒ XRLayer()
  XRPose: ƒ XRPose()
  XRRay: ƒ XRRay()
  XRReferenceSpace: ƒ XRReferenceSpace()
  XRReferenceSpaceEvent: ƒ XRReferenceSpaceEvent()
  XRRenderState: ƒ XRRenderState()
  XRRigidTransform: ƒ XRRigidTransform()
  XRSession: ƒ XRSession()
  XRSessionEvent: ƒ XRSessionEvent()
  XRSpace: ƒ XRSpace()
  XRSystem: ƒ XRSystem()
  XRTransientInputHitTestResult: ƒ XRTransientInputHitTestResult()
  XRTransientInputHitTestSource: ƒ XRTransientInputHitTestSource()
  XRView: ƒ XRView()
  XRViewerPose: ƒ XRViewerPose()
  XRViewport: ƒ XRViewport()
  XRWebGLLayer: ƒ XRWebGLLayer()
  XSLTProcessor: ƒ XSLTProcessor()
  console: console {debug: ƒ, error: ƒ, info: ƒ, log: ƒ, warn: ƒ, …}
  decodeURI: ƒ decodeURI()
  decodeURIComponent: ƒ decodeURIComponent()
  encodeURI: ƒ encodeURI()
  encodeURIComponent: ƒ encodeURIComponent()
  escape: ƒ escape()
  eval: ƒ eval()
  event: undefined
  globalThis: Window {0: global, window: Window, self: Window, document: document, name: "", location: Location, …}
  isFinite: ƒ isFinite()
  isNaN: ƒ isNaN()
  offscreenBuffering: true
  parseFloat: ƒ parseFloat()
  parseInt: ƒ parseInt()
  undefined: undefined
  unescape: ƒ unescape()
  webkitMediaStream: ƒ MediaStream()
  webkitRTCPeerConnection: ƒ RTCPeerConnection()
  webkitSpeechGrammar: ƒ SpeechGrammar()
  webkitSpeechGrammarList: ƒ SpeechGrammarList()
  webkitSpeechRecognition: ƒ SpeechRecognition()
  webkitSpeechRecognitionError: ƒ SpeechRecognitionErrorEvent()
  webkitSpeechRecognitionEvent: ƒ SpeechRecognitionEvent()
  webkitURL: ƒ URL()
}

重点基础概念

如何理解闭包和 IIFE?

  • IIFE
    • IIFE 可以达到不暴露私有成员的目的
    • 能够在 IIFE 完成执行后任维系着内部功能的生存期。
    • IIFE,Immediately Invoked Function Expressions,代表立即执行函数。
    • IIFE 的外层括号不是必须的,因为 IIFE 是一个函数表达式。
  • 闭包

    • 闭包,closure,概念最早提出在 1964 年,1975 年最早实现,是函数和声明该函数的词法环境的组合。词法作用域中使用的域,是变量在代码中声明的位置所决定的。
    • 闭包就是能够读取其他函数内部变量的函数。
    • Javascript语言的特殊之处,就在于函数内部可以直接读取全局变量。另一方面,在函数外部自然无法读取函数内的局部变量。本质上,闭包就是将函数内部和函数外部连接起来的一座桥梁。
    • 为什么使用闭包:
      • 利用闭包实现数据私有化或模拟私有方法,这个方式也称为模块模式。
      • 部分参数函数柯里化。
    • 如何从外部读取局部变量?
      • 那就是在函数的内部,再定义一个函数。这就是 JavaScript 语言特有的”链式作用域”结构(chain scop),子对象会一级一级地向上寻找所有父对象的变量。
    • 使用闭包的注意点
      • 由于闭包会使得函数中的变量都被保存在内存中,内存消耗很大,所以不能滥用闭包,否则会造成网页的性能问题,在IE中可能导致内存泄露。解决方法是,在退出函数之前,将不使用的局部变量全部删除。
      • 闭包会在父函数外部,改变父函数内部变量的值。所以,如果你把父函数当作对象(object)使用,把闭包当作它的公用方法(Public Method),把内部变量当作它的私有属性(private value),这时一定要小心,不要随便改变父函数内部变量的值。

        如何理解全局/函数/块级作用域?

  • 全局作用域:在代码中任何地方都能访问到的对象拥有全局作用域,一般来说以下几种情形拥有全局作用域:

    • 最外层函数 和在最外层函数外面定义的变量拥有全局作用域
    • 所有末定义直接赋值的变量自动声明为拥有全局作用域
    • 所有 window 对象的属性拥有全局作用域
  • 函数作用域:
    • 是指声明在函数内部的变量,和全局作用域相反,局部作用域一般只在固定的代码片段内可访问到
  • eval 作用域:严格模式中引入
  • 块级作用域:ES6 引入

    • let, const
    • if、for 语句里面的 {} 也属于块级作用域

      如何理解作用域链/执行上下文?

      词法作用域

  • JavaScript 在执行过程中会创造可执行上下文,可执行上下文中的词法环境中含有外部词法环境的引用,我们 可以通过这个引用获取外部词法环境的变量、声明等,这些引用串联起来一直指向全局的词法环境,因此形成了作用域 链。

  • 找不到想要访问的变量的时候,会向上一层层查找,这一层层组成了作用域链。
  • 作用域最大的用处就是隔离变量,不同作用域下同名变量不会有冲突。
  • JavaScript 的两个执行阶段:
    • 解释阶段:
    • 词法分析
    • 语法分析
    • 作用域规则确定
  • 执行阶段:
  • 创建执行上下文
  • 执行函数代码
  • 垃圾回收

    var/let/const 与变量提升?

  • 编译器预编译的时候,第一步只会记录变量和函数的定义,第二步才会执行程序。

    • 所有这些函数和变量声明都被添加到名为词法环境的 JavaScript 数据结构内的内存中。
  • var 会变量提升,初始值为 undefined,不能跨函数访问
  • let 和 const 相比 var
    • 都会被提升,但是不会被初始化,不能被引用
    • 只在块级作用域中有效
    • 不允许重复声明
    • 不会绑定全局作用域
  • let 和 const 区别

    • const 定义的指针不能修改,但是指向的对象属性可以修改

      如何理解原型链?

      所有 JavaScript 对象都有一个 prototype 属性,指向它的原型对象。当试图访问一个对象的属性时,如果没有在该对象上找到,它还会搜寻该对象的原型,以及该对象的原型的原型,依次层层向上搜索,直到找到一个名字匹配的属性或到达原型链的末尾。这种行为是在模拟经典的继承,与其说是继承,不如说是委托。
  • 每个对象都有 proto 属性。

  • 函数有 prototype,定义在 ES 规范里。
  • 实例继承构造函数 prototype 的所有属性和方法
    • 实例的 proto 指向构造函数的 prototype
    • 对象具有属性 proto,可称为隐式原型,一个对象的隐式原型指向构造该对象的构造函数的原型,这也保证了实例能够访问在构造函数原型中定义的属性和方法。
  • 几乎所有的 JavaScript 对象都是 Object 的实例。
    • 一个典型的对象继承了 Object.prototype 的属性(包括方法),尽管这些属性可能被遮蔽(也被称为覆盖)。
    • 但是有时候可能故意创建不具有典型原型链继承的对象,比如通过 Object.create(null) 创建的对象,或者通过 Object.setPrototypeOf 方法改变原型链。
    • 改变 Object 原型,会通过原型链,而改变所有对象;除非这些属性和方法被其他对原型链更里层的改动所覆盖。这提供了一个非常强大的、但有潜在危险的机制,来覆盖或扩展对象行为。
  • 所有的构造器的 constructor 都指向 Function
  • Function 的 prototype 指向一个特殊匿名函数,而这个特殊匿名函数的 proto 指向Object.prototype

    Function instanceof Object; // true
    Object instanceof Function; // true
    //①构造器Function的构造器是它自身
    Function.constructor=== Function;//true
    //②构造器Object的构造器是Function(由此可知所有构造器的constructor都指向Function)
    Object.constructor === Function;//true
    //③构造器Function的__proto__是一个特殊的匿名函数function() {}
    console.log(Function.__proto__);//function() {}
    //④这个特殊的匿名函数的__proto__指向Object的prototype原型。
    Function.__proto__.__proto__ === Object.prototype//true
    //⑤Object的__proto__指向Function的prototype,也就是上面③中所述的特殊匿名函数
    Object.__proto__ === Function.prototype;//true
    Function.prototype === Function.__proto__;//true
    

    如何理解显示/隐式类型转换?

  • 在if语句、逻辑语句、数学运算逻辑、==等情况下都可能出现隐式类型转换。

    如何理解属性的枚举?

  • js中基本包装类型的原型属性是不可枚举的,如Object, Array, Number等

  • 枚举性的 作用:for in、Object.keys()、JSON.stringify()

    如何实现不可变数据?

    异步与事件机制

    如何理解 JS 单线程模型与事件机制?

  • 事件循环是一个单线程循环,用于监视调用堆栈并检查是否有工作即将在任务队列中完成。如果调用堆栈为空并且任务队列中有回调函数,则将回调函数出队并推送到调用堆栈中执行。

    • JavaScript 分为同步任务和异步任务
    • 同步任务都在主线程上执行,形成一个执行栈
    • 主线程之外,事件触发线程管理着一个任务队列,只要异步任务有了运行结果,就在任务队列之中放置一个事件。
    • 一旦执行栈中的所有同步任务执行完毕,此时 JavaScript 引擎空闲,系统就会读取任务队列,将可运行的异步任务添加到可执行栈中,开始执行。

      如何理解宏任务与微任务?

  • JavaScript 中分为两种任务类型:macrotask 和 microtask,在 ECMAScript 中,microtask 称为 jobs,macrotask 可称为 task。

  • macrotask 宏任务,可以理解是每次执行栈执行的代码就是一个宏任务,包括每次从事件队列中获取一个事件回调并放到执行栈中执行
    • 每一个 task 会从头到尾将这个任务执行完毕,不会执行其它
    • 浏览器为了能够使得 JavaScript 内部 task 与 DOM 任务能够有序的执行,会在一个 task 执行结束后,在下一个 task 执行开始前,对页面进行重新渲染。
  • microtask 微任务,可以理解是在当前 task 执行结束后立即执行的任务
    • 在当前 task 任务后,下一个 task 之前,在渲染之前
    • 所以它的响应速度相比 setTimeout(setTimeout 是 task)会更快,因为无需等渲染
    • 在某一个 macrotask 执行完后,就会将在它执行期间产生的所有 microtask 都执行完毕(在渲染前)。
  • 分别什么场景会用到 macrotask 和 microtask?
    • macrotask:主代码块,setTimeout,setInterval 等(可以看到,事件队列中的每一个事件都是一个 macrotask)
    • microtask:Promise,process.nextTick 等
  • 在node环境下,process.nextTick 的优先级高于 Promise__,也就是可以简单理解为:在宏任务结束后会先执行微任务队列中的 nextTickQueue 部分,然后才会执行微任务中的 Promise 部分。
  • 从线程角度重新理解:
    • macrotask 中的事件都是放在一个事件队列中的,而这个队列由事件触发线程维护
    • microtask 中的所有微任务都是添加到微任务队列 Job Queues 中,等待当前 macrotask 执行完毕后执行,而这个队列由 JavaScript 引擎线程维护
  • 所以,总结下运行机制:
    • 执行一个宏任务(栈中没有就从事件队列中获取)
    • 执行过程中如果遇到微任务,就将它添加到微任务的任务队列中
    • 宏任务执行完毕后,立即执行当前微任务队列中的所有微任务(依次执行)
    • 当前宏任务执行完毕,开始检查渲染,然后 GUI 线程接管渲染
    • 渲染完毕后,JavaScript 线程继续接管,开始下一个宏任务(从事件队列中获取)
  • 另外,请注意下 Promise 的 polyfill 与官方版本的区别:
    • 官方版本中,是标准的 microtask 形式
    • polyfill,一般都是通过 setTimeout 模拟的,所以是 macrotask 形式
  • 注意,有一些浏览器执行结果不一样,因为它们可能把 microtask 当成macrotask来执行了。

    如何理解 AJAX?

    Ajax 是创建异步 Web 应用的一种 Web 开发技术,起源于 IE 的 Active X 控件,并以 XMLHTTPRequest API 方式提供编程接口。借助 Ajax,Web 应用可以异步(在后台)向服务器发送数据和从服务器检索数据,而不会干扰现有页面的现实和行为。现在通常将 JSON 替换为 XML,因为 JavaScript 对 JSON 由原生支持优势。
    优点:

  • 交互性更好,来自服务器的新内容可以动态更改,不许重新加载整个页面。

  • 减少与服务器的链接,因为脚本和样式只需要被请求一次。
  • 状态可以维护在一个页面上,JavaScript 变量和 DOM 状态将得到保持,因为主容器页面未被重新加载。
  • 基本上包括大部分 SPA 的优点。

缺点:

  • 动态网页很难收藏。
  • 如果 JavaScript 已在浏览器中被禁用,则不起作用。
  • 有些网络爬虫不执行 JavaScript,也不会看到 JavaScript 加载的内容。
  • 基本上包括大部分 SPA 的缺点。

    var xhr = new XMLHttpRequest()
    xhr.open("GET", "/api", false)
    xhr.onreadystatechange = function () {
      // 这里的函数异步执行,可参考之前 JS 基础中的异步模块
      if (xhr.readyState == 4) {
          if (xhr.status == 200) {
              alert(xhr.responseText)
          }
      }
    }
    xhr.send(null)
    

    xhr.readyState 的状态码说明:

  • 0 - (未初始化)还没有调用send()方法

  • 1 -(载入)已调用send()方法,正在发送请求
  • 2 -(载入完成)send()方法执行完成,已经接收到全部响应内容
  • 3 -(交互)正在解析响应内容
  • 4 -(完成)响应内容解析完成,可以在客户端调用了

    如何实现跨域请求?§

  • 同源策略限制了从同一个源加载的文档或脚本如何与来自另一个源的资源进行交互。这是一个用于隔离潜在恶意文件的重要安全机制。

  • 同源是指”协议+域名+端口”三者相同,即便两个不同的域名指向同一个ip地址,也非同源。
  • 不受跨域限制的标签:javascript基础 - 图2