Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

crash when using iframe document #5

Open
mbret opened this issue Apr 15, 2021 · 2 comments
Open

crash when using iframe document #5

mbret opened this issue Apr 15, 2021 · 2 comments

Comments

@mbret
Copy link

mbret commented Apr 15, 2021

Hello, I am trying to use this library with iframe but I get a crash error when passing the iframe document to the resolve function

image

image

Basically the undefined is expected to be a string here.

textarea.value return "" when created on the main page document but it looks like when creating with the iframe document it will be undefined.

Is that a specific behavior from iframe ? Is there a way to workaround ?

One thing to note is that the content in the iframe is an epub document and so is an xhtml page. Maybe the spec of xhtml define undefined instead of "" when a value has not been set yet or something ?

@Juul
Copy link
Member

Juul commented Apr 16, 2021

Can you share your code and xhtml document so I can replicate this error locally? Then I can try to figure out what's going on.

@mbret
Copy link
Author

mbret commented Apr 16, 2021

Sure I will try to create a snippet with iframe to showcase the issue and update this ticket 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants