CRAlpha / CRAlpha/react-native-wkwebview

How to use evaluateJavaScript to get iframe's elements (cors)?

Open
#74 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Objective-C
Stars
637
Forks
263
PR merge metrics
No merged PRs in 30d

Description

Hi,

While the react-native-wkwebview loads the iframe content elements correctly, I cannot get the iframe elements by issuing evaluateJavaScript js code:

var ifrm = document.getElementById("iframeID");
var ifrmContent = (ifrm.contentWindow || ifrm.contentDocument);

ifrmContent.document throws js error.

How to work around this (cors)?

Thanks!

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.