Polyfills

babel-polifill

Array

https://github.com/zloirock/core-js#index

Element

1
2
3
4
5
6
7
8
9
10
11
if (Element.prototype.getAttributeNames == undefined) {
Element.prototype.getAttributeNames = function () {
var attributes = this.attributes;
var length = attributes.length;
var result = new Array(length);
for (var i = 0; i < length; i++) {
result[i] = attributes[i].name;
}
return result;
};
}

参考资料

https://udn.realityripple.com/docs/Web/API/Element/getAttributeNames
https://runebook.dev/zh/docs/dom/element/getattributenames


Polyfills
http://example.com/20230411-polyfills/
作者
csorz
发布于
2023年4月11日
许可协议