@@ -61,28 +61,28 @@ type Directive struct {
61
61
// Priority int `js:"priority"`
62
62
}
63
63
64
- func NewDirective (updater ... func ( el * js. Object , b * DirectiveBinding , val * js. Object ) ) * Directive {
64
+ func NewDirective (updaterCallBack ... interface {} ) * Directive {
65
65
d := & Directive {
66
66
Object : js .Global .Get ("Object" ).New (),
67
67
}
68
- if len (updater ) > 0 {
69
- d .SetUpdater (updater [0 ])
68
+ if len (updaterCallBack ) > 0 {
69
+ d .SetUpdater (updaterCallBack [0 ])
70
70
}
71
71
return d
72
72
}
73
73
74
- func (d * Directive ) SetBinder (fn func ( b * DirectiveBinding ) ) * Directive {
75
- d .Set ("bind" , fn )
74
+ func (d * Directive ) SetBinder (fnCallback interface {} ) * Directive {
75
+ d .Set ("bind" , fnCallback )
76
76
return d
77
77
}
78
78
79
- func (d * Directive ) SetUnBinder (fn func ( b * DirectiveBinding ) ) * Directive {
80
- d .Set ("unbind" , fn )
79
+ func (d * Directive ) SetUnBinder (fnCallback interface {} ) * Directive {
80
+ d .Set ("unbind" , fnCallback )
81
81
return d
82
82
}
83
83
84
- func (d * Directive ) SetUpdater (fn func ( el * js. Object , b * DirectiveBinding , val * js. Object ) ) * Directive {
85
- d .Set ("update" , fn )
84
+ func (d * Directive ) SetUpdater (fnCallback interface {} ) * Directive {
85
+ d .Set ("update" , fnCallback )
86
86
return d
87
87
}
88
88
@@ -109,12 +109,12 @@ type ElementDirective struct {
109
109
* Directive
110
110
}
111
111
112
- func NewElementDirective (updater ... func ( el * js. Object , b * DirectiveBinding , val * js. Object ) ) * ElementDirective {
112
+ func NewElementDirective (updaterCallBack ... interface {} ) * ElementDirective {
113
113
d := & ElementDirective {
114
- Directive : NewDirective (updater ... ),
114
+ Directive : NewDirective (updaterCallBack ... ),
115
115
}
116
- if len (updater ) > 0 {
117
- d .SetUpdater (updater [0 ])
116
+ if len (updaterCallBack ) > 0 {
117
+ d .SetUpdater (updaterCallBack [0 ])
118
118
}
119
119
return d
120
120
}
0 commit comments