mysticatea/event-target-shim

Feature request: make defineEventAttribute variadic

Open

#13 建立於 2018年5月25日

在 GitHub 查看
 (1 留言) (0 反應) (0 負責人)TypeScript (29 fork)github user discovery
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);

貢獻者指南