Skip to content
Gary Soedarsono edited this page Feb 2, 2015 · 13 revisions

component.Token

extends: [[component.Component|component.Component]]

A simple movable component with only one state. Examples of token:

  • Chess piece
  • Cubes
  • Damage marker

To use this, create a pb-c-token element with one child element. This child element will be displayed as the token.

<!-- Example: A square token -->
<pb-c-token>
  <div style="background: red; width: 50px; height: 50px;"></div>
<pb-c-token>

Supported abilities:

new component.Token()

Methods

createdCallback

createdCallback()

Called when the element is created.


Clone this wiki locally