Changeset 36238

Show
Ignore:
Timestamp:
12/22/09 23:03:25 (3 years ago)
Author:
anekos
Message:

around の返値を強化

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lang/javascript/vimperator-plugins/trunk/_libly.js

    r36116 r36238  
    1313    <author mail="suvene@zeromemory.info" homepage="http://zeromemory.sblo.jp/">suVene</author> 
    1414    <license>MIT</license> 
    15     <version>0.1.28</version> 
     15    <version>0.1.29</version> 
    1616    <minVersion>2.3pre</minVersion> 
    1717    <maxVersion>2.3pre</maxVersion> 
     
    4444  通常、next には引数を渡す必要はありません。 
    4545  (任意の引数を渡したい場合は配列で渡します。) 
     46  返値は以下のオブジェクトです 
     47  >|| 
     48  { 
     49    original: オリジナルの関数 
     50    current: 現在の関数 
     51    restore: 元に戻すための関数 
     52  } 
     53  ||< 
    4654bind(obj, func): 
    4755    func に obj を bind します。 
     
    231239            return func.call(self, function (_args) next.apply(self, _args || args), args); 
    232240        }; 
    233         return [next, current]; 
     241        return libly.$U.extend({ 
     242            original: next, 
     243            current: current, 
     244            restore: function () (obj[name] = next) 
     245        }, [next, current]); 
    234246    }, 
    235247    bind: function(obj, func) {