09-20-2023, 10:43 AM | #1 |
Junior Member
Posts: 8
Karma: 10
Join Date: Nov 2017
Device: Kindle PaperWhite 3 (2015) WiFi
|
How to access the elements in "read-book-iframe-1"?
I want to customize the contents with some javascript such as onClick event
The code below results in the error "Uncaught DOMException: Blocked a frame with origin "" from accessing a cross-origin frame." Code:
let read_book_iframe = document.getElementById("read-book-iframe-1"); let element= read_book_iframe.contentWindow.document.querySelector('div'); |
09-20-2023, 10:47 AM | #2 |
creator of calibre
Posts: 44,183
Karma: 23000000
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
You cannot book content is rendered in a sandboxed iframe. If you want to use javascript put it in the book you are reading.
|
Advert | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to tag books as "to be read" "reading" "read" | Xwang | Library Management | 17 | 04-24-2021 02:41 PM |
Pressing "Restore Defaults" under "Book Details" wipes all "Look & Feel" settings. | MarjaE | Library Management | 1 | 03-30-2021 11:46 AM |
Can't access the library "Book" in T65s | giotti | Boyue | 4 | 01-09-2020 02:05 PM |
Touch How transfer "Books Read" and "Hours Read" data | Abrakadabra77 | Kobo Reader | 5 | 02-16-2015 03:30 AM |
"E-book access not so equal" from the Daily Illini | Nate the great | News | 1 | 12-11-2009 01:16 PM |