mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Use window.parent rather than window.top to access iframe's parent
This prevents a cross origin error if the page is embedded inside a third party iframe.
This commit is contained in:
parent
6ea96a83f7
commit
a3f4c961a5
@ -127,7 +127,7 @@ def setup_iframe(iframe):
|
||||
a.setAttribute('target', '_parent')
|
||||
|
||||
def forward_touch_events(ev):
|
||||
container = window.top.document.getElementById(render_book.container_id)
|
||||
container = window.parent.document.getElementById(render_book.container_id)
|
||||
if container:
|
||||
dup = v'new ev.constructor(ev.type, ev)'
|
||||
container.dispatchEvent(dup)
|
||||
|
Loading…
x
Reference in New Issue
Block a user