HtmlELement javascript bind code example
Example: javascript bind
function myFunc(p1, p2, pN, addedParam)
{
// here "this" equals "myThis"
}
let myThis = {};
// create new function that, when invoked, calls
// myFunc using myThis as context.
// prepend params as function arguments to those
// provided when invoked.
let f = myFunc.bind(myThis, "param1", "param2", "paramN");
f("addedParam");