From 1b931e0262796b0179ed92a6a893de9ee1049d01 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Fri, 25 Jan 2019 08:19:36 +0100 Subject: [PATCH] luci-base: luci.js: add L.bind() helper Signed-off-by: Jo-Philipp Wich --- modules/luci-base/htdocs/luci-static/resources/luci.js | 4 ++++ 1 file changed, 4 insertions(+) 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 || []; -- 2.30.2