class Playwright::Connection
def create_remote_object(parent_guid:, type:, guid:, initializer:)
-
(Playwright::ChannelOwner|nil)
-
def create_remote_object(parent_guid:, type:, guid:, initializer:) parent = @objects[parent_guid] unless parent raise "Cannot find parent object #{parent_guid} to create #{guid}" end initializer = replace_guids_with_channels(initializer) result = begin ChannelOwners.const_get(type).new( parent, type, guid, initializer, ) rescue NameError raise "Missing type #{type}" end callback = @waiting_for_object.delete(guid) callback&.fulfill(result) result end