File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -65,7 +65,18 @@ pub const EventTarget = struct {
6565 if (opts_ ) | opts | {
6666 switch (opts ) {
6767 .capture = > | c | capture = c ,
68- .opts = > | o | capture = o .capture orelse false ,
68+ .opts = > | o | {
69+ // Done this way so that, for common cases that _only_ set
70+ // capture, i.e. {captrue: true}, it works.
71+ // But for any case that sets any of the other flags, we
72+ // error. If we don't error, this function call would succeed
73+ // but the behavior might be wrong. At this point, it's
74+ // better to be explicit and error.
75+ if (o .once orelse false ) return error .NotImplemented ;
76+ if (o .signal orelse false ) return error .NotImplemented ;
77+ if (o .passive orelse false ) return error .NotImplemented ;
78+ capture = o .capture orelse false ;
79+ },
6980 }
7081 }
7182
You can’t perform that action at this time.
0 commit comments