Provides methods to deal with active view components and their state.
|Returns the current screen DOM element. Used for class tweaks through DOM manipulation for animations.|
|Register a function that provides a list of classes to apply to the document
|Checks if the current view state was restored from cache.|
Returns the current screen DOM element. Used for class tweaks through DOM manipulation for animations.
Between transitions there are two screens (the one leaving and the one entering), and this function will return the entering screen.
// add custom class 'slide' to screen DOM element $public.View.getCurrentScreenRootElement().classList.add("slide");
registerDeviceClassGetter(getter: function): void
Register a function that provides a list of classes to apply to the document
body. Expected classes to be returned are
landscape — for orientation — and
tablet for device type. The method provided may emit other classes.
This method will be called upon whenever certain events, such as device orientation changes. All classes returned in previous calls will be removed before applying results of new calls.
Method that returns current orientation and device classes to apply.
(): string 
- string 
Promise that will be resolved when the screen/block has been rendered with current model changes. Used to execute logic after the browser has rendered the current changes.
Promise resolved when the screen/block has been rendered with current model changes.
Checks if the current view state was restored from cache.
true when the current view state was restored from cache, or