@demo

  • constructor
documentjs.tags.demo  

Placeholder for an application demo.

@demo SRC [HEIGHT]

/**
 * @demo can/control/control.html 300
 */

Parameters

  1. SRC {String}

    The source of the html page.

  2. HEIGHT {Number}Optional

    The height of the html page. If a height is not provided, the height is determined as the content of the body.

Specifying the HTML and JS source

By default, @demo uses the html of the body minus any script tags as the HTML source. This can be changed by:

  • Adding an element with id="demo-html" or setting window.DEMO_HTML to the source text.
  • Adding id="demo-source" to a script tag or setting window.DEMO_SOURCE to the source JS.