diff options
author | Jo-Philipp Wich <jo@mein.io> | 2019-01-25 08:19:36 +0100 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2019-07-07 15:25:49 +0200 |
commit | 1b931e0262796b0179ed92a6a893de9ee1049d01 (patch) | |
tree | 30888e460eda78db2b24ea53e3efad66df090133 /modules | |
parent | ef187d5238aa0541d48832f3cd32b70ef53d2ad2 (diff) |
luci-base: luci.js: add L.bind() helper
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'modules')
-rw-r--r-- | modules/luci-base/htdocs/luci-static/resources/luci.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/modules/luci-base/htdocs/luci-static/resources/luci.js b/modules/luci-base/htdocs/luci-static/resources/luci.js index 949f730a22..b02710bcb6 100644 --- a/modules/luci-base/htdocs/luci-static/resources/luci.js +++ b/modules/luci-base/htdocs/luci-static/resources/luci.js @@ -488,6 +488,10 @@ throw e; }, + bind: function(fn, self /*, ... */) { + return Function.prototype.bind.apply(fn, this.varargs(arguments, 2, self)); + }, + /* Class require */ require: function(name, from) { var L = this, url = null, from = from || []; |