CustomComponentType

CustomComponentType

new CustomComponentType(options)

Source:

Represents a custom component type, eg. .

Parameters:
Name Type Description
options Object

Options.

Properties
Name Type Description
name String

The component's name, eg. 'chart'.

Members

attributes :Array.<String>

Source:

Gets or sets the custom attributes for this tag, eg. ["src-preview"]. Used so that when the user-supplied html is sanitized, these attributes are not stripped.

Type:
  • Array.<String>

furtherProcessing :Array.<Object>

Source:

Gets or sets an array of objects with additional processNode and shouldProcessNode functions, as above.

Type:
  • Array.<Object>

isCorresponding :CustomComponentType~isCorresponding

Source:

Gets or sets a function which checks a ReactComponent and returns a Boolean indicating if that react component corresponds to this type. "Correspondence" is whatever the component wants it to be. It is used by CustomComponents.find. CustomComponents.find is used by the feature info template to find if any custom components self-update.

Type:
  • CustomComponentType~isCorresponding

name :String

Source:

Gets or sets the tag name, eg. "chart". This is converted to lower case.

Type:
  • String

processNode :CustomComponentType~processNode

Source:

Gets or sets a function which is called when an element of this custom component is created.

Type:
  • CustomComponentType~processNode

selfUpdateSeconds :CustomComponentType~selfUpdateSeconds

Source:

Gets or sets a function which checks a ReactComponent and returns an integer if it both contains this custom component type, and that component would self-update (eg. from a "poll-seconds" attribute).

Type:
  • CustomComponentType~selfUpdateSeconds