[This pattern has bit me in the past](https://github.com/jugglinmike/srcdoc-polyfill/commit/89e334464550938768bb329b31ad20cee690b095). I'd recommend checking what Gecko supports in terms of URL length. If it's finite, you should include an assertion here so that users who try to inject huge scripts have a clue about the failure.