slice();
The slice method redetermines the slice native method used to manage term contents.
To execute this example, add links to the PP.js and PP.Ufe.js files. The following code is executed in the console browser. Create a term with the Term contents and get the first two characters:
// Create a term var term = new PP.Ui.Term({ Content: "Term" }); // Get substring console.log(term.slice(0, 2));
As a result the console displays the two first term characters:
"Te"
See also: