weakmap 和nodelist的forEach 方法的 Polyfill
低端机型下, 没有weakMap和 nodelist的forEach方法, 需要自己做Polyfill
https://developer.mozilla.org/en-US/docs/Web/API/NodeList/forEach
if (window.NodeList && !NodeList.prototype.forEach) {
NodeList.prototype.forEach = Array.prototype.forEach;
}
https://github.com/drses/weak-map
import WeakMap from "weak-map"
self.WeakMap = WeakMap;