Commit 6dccfa3b authored by Jérome Perrin's avatar Jérome Perrin

dms: no need to remove <base> in PDF viewer

I'm not sure what was the problem from this comment, but we render
the gadget in an iframe so there's no need to change the DOM like this.
Probably this was a problem in early versions when it was in the same
page.
parent 23597a79
......@@ -13,13 +13,6 @@
});
})
.declareMethod("render", function (options) {
[].forEach.call(window.document.head.querySelectorAll("base"), function (el) {
// XXX GadgetField adds <base> tag to fit to the parent page location, it's BAD to remove them.
// In the case of pdf.js, all component are loaded dynamicaly through ajax requests in
// pdf-js "folder". By setting a <base> tag, we change the url resolution behavior, and
// we break all dynamic links. So, deleting <base> is required.
window.document.head.removeChild(el);
});
this.props.key = options.key;
webViewerLoad(options.value);
......
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