mysticatea/event-target-shim
在 GitHub 查看Feature request: make defineEventAttribute variadic
Open
#13 建立於 2018年5月25日
enhancementhelp wanted
倉庫指標
- Star
- (130 star)
- PR 合併指標
- (PR 指標待抓取)
描述
right now, one has to do:
defineEventAttribute(Foo, "bar");
defineEventAttribute(Foo, "baz");
// or
["bar", "baz"].forEach( name => defineEventAttribute(Foo, name));
Which is kinda ugly...
What would be nice is a variadic function:
defineEventAttribute(Foo, "bar", "baz" /*, ...and so on*/);
// or
const attributes = ["bar", "baz"]
defineEventAttribute(Foo, ...attributes);