composablesys/collabs

WeakRef fallbacks

mweidner037 opened this issue · 2 comments

WeakRefs are an ES2021 feature that won't work in older browsers. Currently, @collabs/collabs uses them for serializer caching and CLazyMap memory management (via WeakValueMap). In both cases, they are just optimizations, not essential. We should add a fallback that disables these optimizations if WeakRefs are not present.

Likewise for FinalizationRegistry

Fixed in #237