Skip to content

Commit cd5b8ba

Browse files
committed
Add icon badge support for older versions of the library.
1 parent d7bdef5 commit cd5b8ba

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

devtools/bridge.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,17 @@
344344

345345
} );
346346

347+
// Check if THREE is in the global scope (Old versions)
348+
window.addEventListener( 'load', () => {
349+
350+
if ( window.THREE && window.THREE.REVISION) {
351+
352+
dispatchEvent( 'register', { revision: THREE.REVISION } );
353+
354+
}
355+
356+
} );
357+
347358
// Watch for page unload to reset state
348359
window.addEventListener( 'beforeunload', () => {
349360

0 commit comments

Comments
 (0)