1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-25 06:02:27 +01:00

Fix DOM.event.

Closes #116.
This commit is contained in:
Doug Kearns
2015-12-24 03:29:50 +11:00
parent 68871ff16f
commit 5930524f85

View File

@@ -1081,9 +1081,10 @@ var DOM = Class("DOM", {
let params = DEFAULTS[t || "HTML"];
let args = Object.keys(params);
update(params, this.constructor.defaults[type],
Ary.toObject(Object.entries(opts)
.filter(([k]) => k in params)));
update(params, this.constructor.defaults[type]);
for (let p in opts)
if (p in params)
params[p] = opts[p];
apply(evt, "init" + t + "Event", args.map(arg => params[arg]));
return evt;