Commit ee8036cd authored by Robert Knight's avatar Robert Knight

Load final chapter URL in a more realistic way

The real VitalSource viewer loads the final URL with a form submission,
which does not update the `src` attribute of the iframe. Make the demo
page also load the app in a way that doesn't modify the parent frame's
DOM, to ensure the client is not relying on that.
parent 07d6c4ef
......@@ -60,7 +60,9 @@
// The client should only inject into the new frame after step 3.
this.contentFrame.src = 'about:blank';
setTimeout(() => {
this.contentFrame.src = chapterURL;
// Set the final URL in a way that doesn't update the `src` attribute
// of the iframe, to make sure the client isn't relying on that.
this.contentFrame.contentWindow.location.href = chapterURL;
}, 50);
}
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment