Hypothesis may try to inject itself multiple times into an iframe
Extracted from https://github.com/hypothesis/client/issues/530:
Sometimes the client can get injected into an iframe multiple times. I believe this is caused by FrameObserver's _addFrame not immediately registering the iframe as "handled" if the frame has not yet finished loading. Therefore _addFrame can be called for the same frame multiple times, and thus the onFrameAdded callback can be triggered for the same frame multiple times.
This should be fixed by https://github.com/hypothesis/client/pull/3670/. See the changes to _addFrame.
Closing this issue as likely-solved, since there aren't a specific set of reproduction steps that I can test with.