mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-10-21 17:52:25 +08:00
17 lines
315 B
JavaScript
17 lines
315 B
JavaScript
;(function () {
|
|
if (typeof window.WeakRef !== 'undefined') {
|
|
return
|
|
}
|
|
|
|
window.WeakRef = (function (weakMap) {
|
|
function WeakRef(target) {
|
|
weakMap.set(this, target)
|
|
}
|
|
WeakRef.prototype.deref = function () {
|
|
return weakMap.get(this)
|
|
}
|
|
|
|
return WeakRef
|
|
})(new WeakMap())
|
|
})()
|