@@ -16,9 +16,9 @@ function register(object, rootElement) {
16
16
if ( typeof object [ element . getAttribute ( customAttribute ) ] === 'function' ) {
17
17
_registerFunction . call ( this , object , element , customAttribute ) ;
18
18
} else if ( object [ element . getAttribute ( customAttribute ) ] !== undefined ) {
19
- this . attributesMap [ customAttribute ] . bind ( element , object [ element . getAttribute ( customAttribute ) ] ) ;
19
+ this . attributesMap [ customAttribute ] . bind . call ( object , element , object [ element . getAttribute ( customAttribute ) ] ) ;
20
20
} else {
21
- this . attributesMap [ customAttribute ] . bind ( element , element . getAttribute ( customAttribute ) ) ;
21
+ this . attributesMap [ customAttribute ] . bind . call ( object , element , element . getAttribute ( customAttribute ) ) ;
22
22
}
23
23
24
24
} . bind ( this ) ) ;
@@ -32,9 +32,9 @@ function unregister(object, rootElement) {
32
32
if ( typeof object [ element . getAttribute ( customAttribute ) ] === 'function' ) {
33
33
_unregisterFunction . call ( this , object , element , customAttribute ) ;
34
34
} else if ( object [ element . getAttribute ( customAttribute ) ] !== undefined ) {
35
- this . attributesMap [ customAttribute ] . unbind ( element , object [ element . getAttribute ( customAttribute ) ] ) ;
35
+ this . attributesMap [ customAttribute ] . unbind . call ( object , element , object [ element . getAttribute ( customAttribute ) ] ) ;
36
36
} else {
37
- this . attributesMap [ customAttribute ] . unbind ( element , element . getAttribute ( customAttribute ) ) ;
37
+ this . attributesMap [ customAttribute ] . unbind . call ( object , element , element . getAttribute ( customAttribute ) ) ;
38
38
}
39
39
40
40
} . bind ( this ) ) ;
@@ -50,9 +50,9 @@ function _registerFunction(object, element, customAttribute) {
50
50
51
51
object [ element . getAttribute ( customAttribute ) ] = handler ;
52
52
53
- this . attributesMap [ customAttribute ] . bind ( element , handler ) ;
53
+ this . attributesMap [ customAttribute ] . bind . call ( object , element , handler ) ;
54
54
}
55
55
56
56
function _unregisterFunction ( object , element , customAttribute ) {
57
- this . attributesMap [ customAttribute ] . unbind ( element , object [ element . getAttribute ( customAttribute ) ] ) ;
57
+ this . attributesMap [ customAttribute ] . unbind . call ( object , element , object [ element . getAttribute ( customAttribute ) ] ) ;
58
58
}
0 commit comments