Skip to content
Gary Soedarsono edited this page Jan 13, 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.

component.Token()

Methods

register

static register(!Document currentDoc, !Element tokenTemplate)

Registers pb-c-token to the document.

currentDoc !Document The document object to register the element to.
tokenTemplate !Element The template for the `pb-c-token`'s shadow DOM.

Clone this wiki locally