-
-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add window message notifications for embeds: (fixes #333) #335
Conversation
Message sequence for 404 page:
For valid page:
Only difference should be the |
What do you think about dispatching a <replay-web-page
replayBase="/js/"
source="/wacz/example.wacz"
url="https://webrecorder.net"
@wr-page-loading=${handlePageLoading}
></replay-web-page> |
yeah, that could work, though would be in addition to the postMessage messages (at least initially), since its sending between multiple window frames. I guess could have a |
- propagate 'archive-not-found' (from wabac.js) to embed frame, with url/ts, for 404 pages - propagate 'page-loading' with loading true/false, to indicate when a page started/finished loading
…h replayNotFoundError bool to indicate the 404 page - ensure updating multi-ts list uses replaceLoc - add some missing types, types cleanup
…ustom events in response to window message from internal iframe
cfb19df
to
61e3854
Compare
… instead of tracked in location. multiple timestamps are always looked up and never used directly from userinput
- add 'replayNotFoundError' field to 'urlchange' (propagating 'archive-not-found' postMessage message from wabac.js) to embed frame, with url/ts, for 404 pages - propagate 'page-loading' with loading true/false, to indicate when a page started/finished loading. (URL not available here) - Only send one urlchange event per URL change (keep track of change). - Also ensure multi timestamp change uses replaceHistory to avoid an extra navigation. - replay-web-page embed: send rwp-url-change and rwp-page-loading custom events from webcomponent Fixes #333
The
page-loading
message does not have the URL that is being loaded, as that is only available when loading is finished (via other messages like urlchange). The 'archive-not-found' message is initially sent from wabac.js to the immediate iframe, and then the 'replayNotFoundError' field is added to the urlchange event.Only send one urlchange event per URL change (keep track of change).
Also ensure multi timestamp change uses replaceHistory to avoid an extra navigation.
Fixes #333