new Proxy()

Metadata proxy for plugins which makes setting and getting properties more convenient.

Description

Metadata proxy for plugins which makes setting and getting properties more convenient.

Properties
Name Type Description
metadata EventHandlerExecutionMetadata

Proxied metadata object.

pluginName string

Name of the plugin this proxy was created for.

Methods


getReturnValue( [ pluginName ] ) → {boolean|*}

Returns the current overall return value or plugin return value.

Description

Returns the current overall return value or plugin return value.

Parameters
Name Type Attributes Description
pluginName string <optional>

Name of the plugin for which you want to retrieve the registered return values.

Returns

The overall return value if no parameters are given, otherwise it returns the return value of the first handler for the given plugin or undefined if no return values have been registered for the given plugin.


get( property [, pluginName ] ) → {undefined|*}

Returns the stored property for the given plugin.

Description

Returns the stored property for the given plugin.

Parameters
Name Type Attributes Description
property string

Name of the property to be retrieved.

pluginName string <optional>

Name of the plugin. If not given, the property will be returned for the plugin associated with this proxy.

Returns

Stored value or undefined if no value is stored for the given plugin and property.


set( property, value )

Sets the property for the plugin to the given value.

Description

Sets the property for the plugin to the given value.

Parameters
Name Type Description
property string

Property to be set.

value *

New value of the property.