Module: decor/Invalidating

decor/Invalidating

require(["decor/Invalidating"], function (Invalidating) {
  new Invalidating();
});

Mixin class for widgets that want to calculate computed properties at once and/or to render UI at once upon multiple property changes.

Source:
Show inherited

Methods

computeProperties(oldValues, isAfterCreation)

Callback function to calculate computed properties upon property changes.

Parameters:
Name Type Description
oldValues Object

The hash table of old property values, keyed by property names.

isAfterCreation boolean

True if this call is right after instantiation.

Source:

deliverComputing()

Synchronously deliver change records for computed properties so that computeProperties() is called if there are pending change records.

Source:

discardComputing()

Discard change records for computed properties.

Source:

<protected> initializeInvalidating()

Make initial calls to computeProperties(), initializeRendering(), and refreshRendering(), and setup observers so those methods are called whenever properties are modified in the future. Normally this method is called automatically by the constructor, and should not be called manually, but the method is exposed for custom elements since they do not call the constructor() method.

Source:

initializeRendering(oldValues)

Callback function to initialize rendering.

Parameters:
Name Type Description
oldValues Object

The hash table of old property values, keyed by property names.

Source:

refreshRendering(oldValues, isAfterInitialRendering)

Callback function to render UI upon property changes.

Parameters:
Name Type Description
oldValues Object

The hash table of old property values, keyed by property names.

isAfterInitialRendering boolean

True if this call is right after initializeRendering().

Source:

shouldInitializeRendering(oldValues, isAfterCreation) → {boolean}

Function to return if rendering should be initialized. (Instead of making partial changes for post-initialization)

Parameters:
Name Type Description
oldValues Object

The hash table of old property values, keyed by property names.

isAfterCreation boolean

True if this call is right after instantiation.

Source:
Returns:

True if rendering should be initialized.

Type
boolean