Commit 2e32dcb2 authored by Randall Leeds's avatar Randall Leeds

hack around PDF.js for now

Fixes #74
Fixes #286
parent 8cc12481
......@@ -22,9 +22,15 @@ class Annotator.Host extends Annotator
delete @options.app
# Create the iframe
if document.baseURI and window.PDFView?
# XXX: Hack around PDF.js resource: origin. Bug in jschannel?
hostOrigin = '*'
else
hostOrigin = window.location.origin
@frame = $('<iframe></iframe>')
.css(visibility: 'hidden')
.attr('src', "#{@app}#/?xdm=#{encodeURIComponent(window.location.origin)}")
.attr('src', "#{@app}#/?xdm=#{encodeURIComponent(hostOrigin)}")
.appendTo(@wrapper)
.addClass('annotator-frame annotator-outer annotator-collapsed')
.bind 'load', => this._setupXDM()
......
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