Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
I've been working on several applications with both HiGlass/Gosling where I'm generating HTML on the fly for the web-browser. I'd like to avoid writing the HTML to disk, and instead load the content via a data url (e.g.
data:text/html,<doctype!><html><h1>Hey</h1></html>
). Currently this throws an unrecoverable error due to an edge case with the version ofpub-sub-es
that higlass is on. This can additionally be useful withpuppeteer
for taking screenshots:pub-sub-es
instantiates a browserBroadcastChannel
if available on import to broadcast events from thegloablPubSub
. Instantiating aBroadcastChannel
throws if the website does not contain an origin, which is the case when the page content is the url. The previous version ofpub-sub-es
doesn't catch this edge case,pub-sub-es v1.2
while the latest version wraps the instantiation in a blanket
try
/catch
.pub-sub-es v2
Breaking changes?
From what I can tell, the breaking changes in v2 are changes to options parameter for
createPubSub
, which higlass does not rely on. @flekschashttps://github.com/flekschas/pub-sub/blob/master/CHANGELOG.md
Checklist