We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c01ba7c commit a6bdef9Copy full SHA for a6bdef9
filter.go
@@ -8,15 +8,14 @@ type Filter struct {
8
*js.Object
9
Read interface{} `js:"read"`
10
Write interface{} `js:"write"`
11
- // Read func(vm *ViewModel, args []*js.Object) *js.Object `js:"read"`
12
- // Write func(vm *ViewModel, args []*js.Object) *js.Object `js:"write"`
13
}
14
15
-func NewFilter(read func(val *js.Object) *js.Object) *Filter {
+// using interface{} type here to utilize GopherJS type convertion automatically
+func NewFilter(readerfn interface{}) *Filter {
16
f := &Filter{
17
Object: js.Global.Get("Object").New(),
18
19
- f.Read = read
+ f.Read = readerfn
20
return f
21
22
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル
0 commit comments