ResourceManager.unRegisterControl

Syntax

unRegisterControl(control: PP.Ui.Control);

Parameters

control. Control.

Description

The unRegisterControl method removes control from the list of controls registered in resource manager.

Example

Before executing the example start the script given in the page with description of the ResourceManager.registerControl method. Remove the button from the list of controls registered in resource manager, and then delete this button:

// Exclude the button from the list of registered controls of resource manager
PP.resourceManager.unRegisterControl(button);
if (!PP.resourceManager.isControlRegistered(button)) {
    console.log("Button is excluded from the list of registered controls in resource manager");
    // Remove the button
    button.dispose();
};

After executing the example the browser console displays a message informing that the button is removed from the list of elements registered in resource manager. Then this button is removed from the page.

See also:

ResourceManager