Class: Dommy::Js::Quickjs::WasmBridge::JSValue

Inherits:
Struct
  • Object
show all
Defined in:
lib/dommy/js/quickjs/wasm_bridge.rb

Overview

An opaque handle to a JS value living in the VM. ‘ref` is the integer id into the JS-side jsRefs table.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#refObject

Returns the value of attribute ref

Returns:

  • (Object)

    the current value of ref



20
21
22
# File 'lib/dommy/js/quickjs/wasm_bridge.rb', line 20

def ref
  @ref
end

Instance Method Details

#to_sObject



21
22
23
# File 'lib/dommy/js/quickjs/wasm_bridge.rb', line 21

def to_s
  "#<JSValue ref=#{ref}>"
end