- Source:
Application default variables.
Example
Craft.Core.Defaults.BASE_DIV_NAME = 'CraftRoot';
Craft.Core.Defaults.ALLOW_COMPONENT_SHORTCUT = true;
Members
(static) BASE_DIV_NAME
- Source:
Element.id of the root element.
It is recommended to use default (CraftRoot).
Example
// at your bootloader
Craft.Core.Defaults.BASE_DIV_NAME = 'ROOT';
// at any place
let rootElement = document.getElementById(Craft.Core.Defaults.BASE_DIV_NAME);
// if your RootViewController is managed by Craft.Core.Context, you may get the same result by:
let rootElement = Craft.Core.Contest.getRootElement();
(static) ALLOW_COMPONENT_SHORTCUT
- Source:
Whether to use component shortcut.
True to set window['componentId'] = component
, to be able to use ${componentId}.method()
in template.
This is set to false by default, but it is recommended to set to true at the start of your application bootloader.