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

srcdoc attribute in mobile WebView #238

Open
vadym-gyant opened this issue Feb 16, 2023 · 1 comment
Open

srcdoc attribute in mobile WebView #238

vadym-gyant opened this issue Feb 16, 2023 · 1 comment

Comments

@vadym-gyant
Copy link

When the iframe is created it has initial content that is converted into a srcdoc attribute. As far as I understood, it serves as a mount point for content inside.
When such iframe is used inside of the mobile app webview (ReactNative for example), it throws an error. I think that the main issue is that WebView can't handle the srcdoc in iframes.

Is there a way to remove scrdoc attribute?

@ryanseddon
Copy link
Owner

v5 was the big shift to srcdoc to move away from the legacy doc.write method due to performance issues, csp and other things.

I'm surprised it throws an error in a webview considering it is the same browser engine. Do you have the stack trace for the error you're getting?

In the meantime you can use v4.x.x which doesn't use srcdoc.

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