aboutsummaryrefslogtreecommitdiffstats
path: root/_libly.js
diff options
context:
space:
mode:
authoranekos2009-12-10 11:27:16 +0000
committeranekos2009-12-10 11:27:16 +0000
commit780fbfe9c4d30ac53488c7cc55d7890aca6c6a5f (patch)
tree4ed7749b56523d310bc613d855cda40e22334129 /_libly.js
parent9c1f0509f90e6c4357cb3af7bcc157a92ba28390 (diff)
downloadvimperator-plugins-780fbfe9c4d30ac53488c7cc55d7890aca6c6a5f.tar.bz2
around を拡張
git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@36114 d0d07461-0603-4401-acd4-de1884942a52
Diffstat (limited to '_libly.js')
-rwxr-xr-x_libly.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/_libly.js b/_libly.js
index bdd3aa6..46bd0e8 100755
--- a/_libly.js
+++ b/_libly.js
@@ -12,7 +12,7 @@ var PLUGIN_INFO =
<description lang="ja">適当なライブラリっぽいものたち。</description>
<author mail="suvene@zeromemory.info" homepage="http://zeromemory.sblo.jp/">suVene</author>
<license>MIT</license>
- <version>0.1.26</version>
+ <version>0.1.27</version>
<minVersion>2.3pre</minVersion>
<maxVersion>2.3pre</maxVersion>
<updateURL>http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk/_libly.js</updateURL>
@@ -41,7 +41,8 @@ around(obj, name, func):
という形で呼ばれます。
next はオリジナルの関数を呼び出すための関数、
args はオリジナルの引数列です。
- next には引数を渡す必要はありません。
+ 通常、next には引数を渡す必要はありません。
+ (任意の引数を渡したい場合は配列で渡します。)
bind(obj, func):
func に obj を bind します。
func内からは this で obj が参照できるようになります。
@@ -227,7 +228,7 @@ libly.$U = {//{{{
let next = obj[name];
let current = obj[name] = function () {
let self = this, args = arguments;
- return func.call(self, function () next.apply(self, args), args);
+ return func.call(self, function (_args) next.apply(self, _args || args), args);
};
return [next, current];
},