Firefox RDP
Esc

Start typing to search the docs

LongStringFront

5 min read · 828 words

View as Markdown

@openpolyfill/firefox-rdp


@openpolyfill/firefox-rdp / LongStringFront

Class: LongStringFront

Defined in: src/client.ts:485

A generic actor client: use call() or the methods proxy to invoke actor methods.

Extends

Constructors

Constructor

new LongStringFront(client, actorId, grip?): LongStringFront

Defined in: src/client.ts:487

Parameters

client

FirefoxRDP

actorId

string

grip?
actor

string

initial

string

length

number

Returns

LongStringFront

Overrides

ActorFront.constructor

Properties

actorId

readonly actorId: string

Defined in: src/client.ts:60

Inherited from

ActorFront.actorId


api

readonly api: Record<string, (…args) => Promise<unknown>>

Defined in: src/client.ts:52

Firefox-spec positional method calls; arguments are marshalled by Arg/Option templates.

Inherited from

ActorFront.api


client

readonly client: FirefoxRDP

Defined in: src/client.ts:59

Inherited from

ActorFront.client


form

form: Params | undefined

Defined in: src/client.ts:49

Most recent actor form, when supplied by the remote actor.

Inherited from

ActorFront.form


methods

readonly methods: Record<string, (params?) => Promise<RDPResponse>>

Defined in: src/client.ts:50

Inherited from

ActorFront.methods


spec?

protected optional spec?: ActorSpec

Defined in: src/client.ts:53

Inherited from

ActorFront.spec

Accessors

initial

Get Signature

get initial(): string | undefined

Defined in: src/client.ts:498

Returns

string | undefined


length

Get Signature

get length(): number | undefined

Defined in: src/client.ts:495

Returns

number | undefined


specTypeName

Get Signature

get specTypeName(): string | undefined

Defined in: src/client.ts:54

Returns

string | undefined

Inherited from

ActorFront.specTypeName

Methods

adoptFrom()

adoptFrom(other): this

Defined in: src/client.ts:190

Preserve listeners when a generic actor is upgraded to a specialized front.

Parameters

other

ActorFront

Returns

this

Inherited from

ActorFront.adoptFrom


call()

call(method, params?): Promise<RDPResponse>

Defined in: src/client.ts:109

Parameters

method

string

params?

Params = {String.fromCharCode(123)}{String.fromCharCode(125)}

Returns

Promise<RDPResponse>

Inherited from

ActorFront.call


dispatch()

dispatch(packet): void

Defined in: src/client.ts:208

Parameters

packet

RDPResponse

Returns

void

Inherited from

ActorFront.dispatch


invoke()

invoke(method, …args): Promise<unknown>

Defined in: src/client.ts:92

Call the named Firefox actor method with its original positional JS signature.

Parameters

method

string

args

…unknown[]

Returns

Promise<unknown>

Inherited from

ActorFront.invoke


isEvent()

isEvent(packet): boolean

Defined in: src/client.ts:202

Parameters

packet

RDPResponse

Returns

boolean

Inherited from

ActorFront.isEvent


listen()

listen(type, listener): this

Defined in: src/client.ts:114

Subscribe with Firefox’s native positional Front event signature.

Parameters

type

string

listener

(…args) => void

Returns

this

Inherited from

ActorFront.listen


off()

off(type, listener): this

Defined in: src/client.ts:176

Parameters

type

string

listener

PacketListener

Returns

this

Inherited from

ActorFront.off


on()

on(type, listener): this

Defined in: src/client.ts:168

Parameters

type

string

listener

PacketListener

Returns

this

Inherited from

ActorFront.on


once()

once(type, listener): this

Defined in: src/client.ts:181

Parameters

type

string

listener

PacketListener

Returns

this

Inherited from

ActorFront.once


registerEvents()

registerEvents(…types): this

Defined in: src/client.ts:163

Mark event packet types explicitly, even if no listener is currently attached.

Parameters

types

…string[]

Returns

this

Inherited from

ActorFront.registerEvents


setGrip()

setGrip(grip): void

Defined in: src/client.ts:501

Parameters

grip
actor

string

initial

string

length

number

Returns

void


substring()

substring(start, end): Promise<string>

Defined in: src/client.ts:515

Parameters

start

number

end

number

Returns

Promise<string>


text()

text(chunkSize?): Promise<string>

Defined in: src/client.ts:505

Read the complete string using chunked substring requests, including its initial prefix.

Parameters

chunkSize?

number = ...

Returns

Promise<string>


unlisten()

unlisten(type, listener): this

Defined in: src/client.ts:122

Parameters

type

string

listener

(…args) => void

Returns

this

Inherited from

ActorFront.unlisten


useSpec()

useSpec(spec): this

Defined in: src/client.ts:85

Attach an actor spec to enable schema-based calls and automatic event routing.

Parameters

spec

ActorSpec

Returns

this

Inherited from

ActorFront.useSpec


waitFor()

waitFor(type, options?): Promise<RDPResponse>

Defined in: src/client.ts:128

Await one event, optionally with cancellation and timeout.

Parameters

type

string

options?
signal?

AbortSignal

timeoutMs?

number

Returns

Promise<RDPResponse>

Inherited from

ActorFront.waitFor