:right-sidebar: True WeakValue =================================================================== .. currentmodule:: gi.repository.JavaScriptCore .. class:: WeakValue(**properties: ~typing.Any) :no-contents-entry: Superclasses: :class:`~gi.repository.GObject.Object` JSCWeakValue represents a weak reference to a value in a :obj:`~gi.repository.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 :obj:`~gi.repository.JavaScriptCore.Context` either. Constructors ------------ .. rst-class:: interim-class .. class:: WeakValue :no-index: .. classmethod:: new(value: ~gi.repository.JavaScriptCore.Value) -> ~gi.repository.JavaScriptCore.WeakValue Create a new :obj:`~gi.repository.JavaScriptCore.WeakValue` for the JavaScript value referenced by ``value``\. :param value: a :obj:`~gi.repository.JavaScriptCore.Value` Methods ------- .. rst-class:: interim-class .. class:: WeakValue :no-index: .. method:: get_value() -> ~gi.repository.JavaScriptCore.Value Get a :obj:`~gi.repository.JavaScriptCore.Value` referencing the JavaScript value of ``weak_value``\. Properties ---------- .. rst-class:: interim-class .. class:: WeakValue :no-index: .. attribute:: props.value :type: ~gi.repository.JavaScriptCore.Value The type of the None singleton. Signals ------- .. rst-class:: interim-class .. class:: WeakValue.signals :no-index: .. method:: cleared() -> None The type of the None singleton.