class WebkitRemote::Client::JsProperty
A property of a remote JavaScript object.
Attributes
@return [Boolean] true if JavaScript code can remove this property
@return [Boolean] true if JavaScript code can remove this property
@return [Boolean] true if JavaScript code can enumerate this property
@return [Boolean] true if JavaScript code can enumerate this property
@return [String] the property's name
@return [WebkitRemote::JsObject] the object that this property belongs
to
@return [WebkitRemote::Client::JsObject, Boolean, Number, String, nil]
a Ruby wrapper for the property's value; primitives get wrapped by standard Ruby classes, and objects get wrapped by JsObject instances
@return [Boolean] true if JavaScript code can change this property's value
@return [Boolean] true if JavaScript code can change this property's value
Public Class Methods
@param [Hash<String, Object>] raw_property a PropertyDescriptor instance,
according to the Webkit remote debugging protocol; this is an item in the array returned by the 'Runtime.getProperties' RPC call
@param [WebkitRemote::Client::JsObject] owner the object that this
property belongs to
# File lib/webkit_remote/client/runtime.rb, line 477 def initialize(raw_property, owner) # NOTE: these are only used at construction time client = owner.client group_name = owner.group.name @owner = owner @name = raw_property['name'] @configurable = !!raw_property['configurable'] @enumerable = !!raw_property['enumerable'] @writable = !!raw_property['writable'] @js_getter = raw_property['get'] && WebkitRemote::Client::JsObject.for( raw_property['get'], client, group_name) @js_setter = raw_property['set'] && WebkitRemote::Client::JsObject.for( raw_property['set'], client, group_name) @value = raw_property['value'] && WebkitRemote::Client::JsObject.for( raw_property['value'], client, group_name) end
Public Instance Methods
Debugging output.
# File lib/webkit_remote/client/runtime.rb, line 496 def inspect result = self.to_s result[-1, 0] = " name=#{@name.inspect} configurable=#{@configurable} " + "enumerable=#{@enumerable} writable=#{@writable}" result end