java - webview loadDataWithBaseUrl on iframe -
backstory(or trying do)
i have webview in app loads html file assets folder. file has 2 iframes in it.
then user imports zip files in app include additional files loaded in these iframes. load these files passing file:// urls javascript function on main page(the 1 2 iframes), rest javascript. main page injects additional js , javascript after user files loaded in iframes. working fine.
problem
all fine. except when file xhtml file. injected javascript has dom manipulation functions not work when file loaded text/xhtml. have pc version of same app uses chromium embedded framework, solved problem there writing custom resource loader loads xhtml files text/html mimetype.
what tried far
i tried same in android version. except not have anyway target iframe inside webview in java side.
i using shouldoverrideurlloading(webview view, string url)
, returning true if it's .xhtml url. thought(because of function's counterpart in cef) first arg in function iframe , used loaddatawithbaseurl
. turns out it's not iframe main webview itself.
question
is there anyway load data iframe java, similiar function? if not have suggestions on transferring such files text/html instead of text/xhtml.
or there can on javascript side?
okay,
solved case renaming .xhtml files .html files while importing.
but still webviews lacking @ accessing iframes java case. solved using individual webviews instead of iframes.
i guess have use parts of chromium source(chromeview) able access inner frames. although api not similiar or compatible webview, can go chromeviews own api.
Comments
Post a Comment