You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
1.4 KiB
36 lines
1.4 KiB
'use strict';
|
|
|
|
System.register([], function (_export, _context) {
|
|
"use strict";
|
|
|
|
return {
|
|
setters: [],
|
|
execute: function () {
|
|
// Source: https://github.com/jserz/js_piece/blob/master/DOM/ParentNode/append()/append().md
|
|
(function (arr) {
|
|
arr.forEach(function (item) {
|
|
if (item.hasOwnProperty('append')) {
|
|
return;
|
|
}
|
|
Object.defineProperty(item, 'append', {
|
|
configurable: true,
|
|
enumerable: true,
|
|
writable: true,
|
|
value: function append() {
|
|
var argArr = Array.prototype.slice.call(arguments),
|
|
docFrag = document.createDocumentFragment();
|
|
|
|
argArr.forEach(function (argItem) {
|
|
var isNode = argItem instanceof Node;
|
|
docFrag.appendChild(isNode ? argItem : document.createTextNode(String(argItem)));
|
|
});
|
|
|
|
this.appendChild(docFrag);
|
|
}
|
|
});
|
|
});
|
|
})([Element.prototype, Document.prototype, DocumentFragment.prototype]);
|
|
}
|
|
};
|
|
});
|
|
//# sourceMappingURL=polyfills.js.map
|
|
|