PP.Ui.setEnblTo(value: Boolean, nodes: Array);
values. Value to be set. Available values: true - Availability attribute is selected, false - availability attribute is deselected.
nodes. Nodes with selected or deselected availability attribute. Array items are the object of the HTMLElement type.
The setEnblTo method is used to select or deselect availability attribute of nodes.
To execute the example, the HTML page must contain links to PP.js script file and to PP.css styles file in the <body> tag of the HTML page of the <div> item with the button identifier. In the onload event of the <body> tag it is necessary to specify the call of the createButton() function. Add button on the page:
function createButton() { // Create a button button = new PP.Ui.Button({ // Set parent item ParentNode: "button", // Set button contents Content: "Button", }); // Deselect availability attribute from button item PP.Ui.setEnblTo(false, [ button.getDomNode() ]); }
As a result button is unavailable:
See also: