JavaScriptCore.WeakValue

g GObject.Object GObject.Object JavaScriptCore.WeakValue JavaScriptCore.WeakValue GObject.Object->JavaScriptCore.WeakValue

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new (value)

get_value ()

Virtual Methods

Inherited:

GObject.Object (7)

Properties

Name

Type

Flags

Short Description

value

JavaScriptCore.Value

w/co

Signals

Inherited:

GObject.Object (1)

Name

Short Description

cleared

This signal is emitted when the JavaScript value is destroyed.

Fields

Inherited:

GObject.Object (1)

Class Details

class JavaScriptCore.WeakValue(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

JavaScriptCore.WeakValueClass

JavaScriptCore.WeakValue represents a weak reference to a value in a JavaScriptCore.Context. It can be used to keep a reference to a JavaScript value without protecting it from being garbage collected and without referencing the JavaScriptCore.Context either.

classmethod new(value)
Parameters:

value (JavaScriptCore.Value) – a JavaScriptCore.Value

Returns:

a new JavaScriptCore.WeakValue

Return type:

JavaScriptCore.WeakValue

Create a new JavaScriptCore.WeakValue for the JavaScript value referenced by value.

get_value()
Returns:

a new JavaScriptCore.Value or None if self was cleared.

Return type:

JavaScriptCore.Value

Get a JavaScriptCore.Value referencing the JavaScript value of self.

Signal Details

JavaScriptCore.WeakValue.signals.cleared(weak_value)
Signal Name:

cleared

Flags:

RUN_LAST

Parameters:

weak_value (JavaScriptCore.WeakValue) – The object which received the signal

This signal is emitted when the JavaScript value is destroyed.

Property Details

JavaScriptCore.WeakValue.props.value
Name:

value

Type:

JavaScriptCore.Value

Default Value:

None

Flags:

WRITABLE, CONSTRUCT_ONLY

The JavaScriptCore.Value referencing the JavaScript value.