Home Reference Source
import LocalReference from 'remote-context/lib/LocalReference.js'
public class | source

LocalReference

A reference to a local value. Any change to the LocalReference will be send to the remote peer.

Constructor Summary

Public Constructor
public

constructor(session: RemoteSession, reference: Reference)

Create a reference to a local value.

Method Summary

Public Methods
public

defineProperty(property: Property, descriptor: Descriptor): boolean

Define a property on the reference value.

public

deleteProperty(property: Property): boolean

Delete a property from the reference value.

public

deletePropertyCache(property: Property): boolean

Delete property cache for a getter .

public

prevent extensions on the reference value.

public

setPropertyCache(property: Property, cachedValue: Descriptor): boolean

Set property cache for getter.

public

Set the prototype of the reference value.

Public Constructors

public constructor(session: RemoteSession, reference: Reference) source

Create a reference to a local value.

Params:

NameTypeAttributeDescription
session RemoteSession

The reference remote session

reference Reference

The local reference id

Public Methods

public defineProperty(property: Property, descriptor: Descriptor): boolean source

Define a property on the reference value.

Params:

NameTypeAttributeDescription
property Property

The property

descriptor Descriptor

The property descriptor

Return:

boolean

True on success

public deleteProperty(property: Property): boolean source

Delete a property from the reference value.

Params:

NameTypeAttributeDescription
property Property

The property

Return:

boolean

True on success

public deletePropertyCache(property: Property): boolean source

Delete property cache for a getter .

Params:

NameTypeAttributeDescription
property Property

The property

Return:

boolean

True on success

public preventExtensions(): boolean source

prevent extensions on the reference value.

Return:

boolean

True on success

public setPropertyCache(property: Property, cachedValue: Descriptor): boolean source

Set property cache for getter.

Params:

NameTypeAttributeDescription
property Property

The property

cachedValue Descriptor

The property descriptor

Return:

boolean

True on success

public setPrototypeOf(prototype: object | function): boolean source

Set the prototype of the reference value.

Params:

NameTypeAttributeDescription
prototype object | function

The new prototype

Return:

boolean

True on success