Configuration switches
Toolkit supports runtime options that are settable as attributes on the <script>
tag that loads platform.js
, or as URL query parameters.
debug
Conditionally loads a debug version of platform.js
.
Example
<script src="platform/platform.js" debug></script>
Or, equivalently:
http://localhost/toolkitchen/toolkit/getting_started/?debug
By default a minified version of platform (platform.min.js
) is loaded.
Using debug
loads platform.debug.js
.
log
Controls console output.
Example
<script src="platform/platform.js" log="bind,ready"></script>
Or, equivalently:
http://localhost/toolkitchen/toolkit/getting_started/?log=bind,ready
Possible values:
Value | Description |
---|---|
bind | Setup actions performed by the data-binding engine. |
data | Runtime data transforms that result from bindings |
watch | Data change notifications |
events | Custom event bindings and event propagations |
ready | Custom element reaching a ready state |
shadow
Selects a Shadow DOM implementation: native
for supported browsers or polyfill
for unsupported browsers.
Example
<script src="platform/platform.js" debug shadow="polyfill"></script>
Or, equivalently:
http://localhost/toolkitchen/toolkit/getting_started/?debug&shadow=polyfill
Possible attribute values:
Value | Description |
---|---|
native | Native implementation if the browser supports it. Default if browser supports Shadow DOM. |
polyfill | Forces the Shadow DOM polyfill to be loaded using platform.poly.min.js . Default for browsers that do not support Shadow DOM natively. |