There is an issue in Firefox 91 where the close() method is being called but it also doesn't exists (which is weird because it should have been polyfilled).
This may be a race condition though.
In any case, the optional chaining of a function call should be invoked with ?.(), to guard for null up the chain.
We also only call the polyfill when the element is not there and we guard the method calls vs the open attribute.
There is an issue in Firefox 91 where the close() method is being called but it also doesn't exists (which is weird because it should have been polyfilled).
This may be a race condition though.
In any case, the optional chaining of a function call should be invoked with
?.()
, to guard fornull
up the chain.We also only call the polyfill when the element is not there and we guard the method calls vs the open attribute.