Object.dispose

Syntax

dispose();

Description

The dispose method deleted component.

Example

To execute the example, link the PP.js library and the PP.css visual styles library to HTML page.

Creates two buttons: an instance of the Button class with the MyButton inscription and the HTML page with the Delete inscription on pressing the last one the first button is deleted.

<button onclick = b1.dispose();>Delete</button>

<script type="text/javascript">

      var b1 = new PP.Ui.Button({

          ParentNode: document.getElementById("btn1"),

          Content: "MyButton"})

</script>

After executing the example on clicking the delete button, MyButton is deleted.

See also:

Object