msn0 / mdn-polyfills

MDN polyfills - from, forEach, filter, find, findIndex, assign, includes, create, entries, of, repeat, startsWith, endsWith, toggleAttribute, bind, MouseEvent, CustomEvent, padEnd, padStart
https://msn0.github.io/mdn-polyfills
175 stars 25 forks source link

Add various dom mutation methods #42

Closed keithamus closed 6 years ago

keithamus commented 6 years ago

Following the addition of Node.prototype.append, this adds Node.prototype.prepend/after/before/remove/replaceWith

keithamus commented 6 years ago

Thanks @msn0 I've rebased to reflect the changes. I didn't notice this before, but ChildNode is not the same as Node - but ChildNode doesn't really exist. I've amended the index.js files to patch the correct prototypes. Do you think I should change the names of the polyfills from e.g. Node.prototype.remove to ChildNode.prototype.remove?

msn0 commented 6 years ago

I think we can stay with Node.prototype.*

msn0 commented 6 years ago

+ mdn-polyfills@5.11.0