DescriptionContext¶
Overview¶
API Context for description plugins.
@author Jonathan Olson <jonathan.olson@colorado.edu>
Class DescriptionContext¶
Instance Methods¶
get( tandemID : string ) : PhetioObject | null¶
link( property : TReadOnlyProperty<unknown>, listener : PropertyLinkListener<unknown> )¶
lazyLink( property : TReadOnlyProperty<unknown>, listener : PropertyLazyLinkListener<unknown> )¶
unlink( property : TReadOnlyProperty<unknown>, listener : PropertyLazyLinkListener<unknown> )¶
createDerivedProperty( dependencies : TReadOnlyProperty<unknown>[], derivation : ( ...args: unknown[] ) => unknown ) : TReadOnlyProperty<unknown>¶
multilink( dependencies : Readonly<TReadOnlyProperty<unknown>[]>, callback : () => void ) : UnknownMultilink¶
addListener( emitter : TReadOnlyEmitter<unknown[]>, listener : TEmitterListener<unknown[]> )¶
removeListener( emitter : TEmitter<unknown[]>, listener : TEmitterListener<unknown[]> )¶
nodeSet( node : Node, property : keyof Node, value : unknown )¶
propertySet( property : TProperty<unknown>, value : unknown )¶
createCallbackTimer( options? : CallbackTimerOptions ) : CallbackTimer¶
createUtterance( options? : UtteranceOptions ) : Utterance¶
createNode( options? : NodeOptions ) : Node¶
Creates a Node through the context.
TODO: Consider making the tagName required for this context? See https://github.com/phetsims/joist/issues/941
dispose()¶
Static Methods¶
startupComplete()¶
registerStrings( strings : DescriptionStrings ) : DescriptionStrings¶
registerLogic( logic : DescriptionLogic ) : DescriptionLogic¶
externalLoad( str : string ) : Promise<Error | null>¶
Type DescriptionLogic¶
Type DescriptionStrings¶
- locale: Locale
Class ExternalLoadError¶
Constructor¶
new ExternalLoadError( error : Error, dataURI : string )¶
Instance Methods¶
Instance Properties¶
line : number¶
(readonly)
column : number¶
(readonly)
Source Code¶
See the source for DescriptionContext.ts in the joist repository.