Skip to main content
Version: 3.3.2

WeakRef

The WeakRef constructor creates a WeakRef object referring to a given target object.

Syntax

new WeakRef(targetObject)

Note: WeakRef() can only be constructed with new. Attempting to call it without new throws a TypeError.

Parameters

  • targetObject
    • : The target object the WeakRef should refer to (also called the referent).