Baseline Widely available
deref
æ¹æ³è¿åWeakRef
å®ä¾çç®æ 对象ï¼å¦æç®æ 对象已被å徿¶éï¼åè¿åundefined
ã
è¿å WeakRef çç®æ 对象ï¼å¦æè¯¥å¯¹è±¡å·²è¢«å徿¶éï¼åè¿åundefined
ã
æå
³ä¸äºéè¦è¯´æï¼è¯·åé
WeakRef
页é¢ä¸çNotes on WeakRefs ã
æå
³å®æ´ç¤ºä¾ï¼è¯·åé
WeakRef
页é¢ç示ä¾é¨åã
const tick = () => {
// Get the element from the weak reference, if it still exists
const element = this.ref.deref();
if (element) {
element.textContent = ++this.count;
} else {
// The element doesn't exist anymore
console.log("The element is gone.");
this.stop();
this.ref = null;
}
};
è§è æµè§å¨å
¼å®¹æ§ åè§
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4