こんにちは、簡単な質問です。
webview からネイティブを呼び出す最良の方法は何ですか。iframeまたはwindow.location ? _
例えば:
gapBridge = document.createElement("iframe");
gapBridge.setAttribute("style", "display:none;");
gapBridge.setAttribute("height","0px");
gapBridge.setAttribute("width","0px");
gapBridge.setAttribute("frameborder","0");
document.documentElement.appendChild(gapBridge);
gapBridge.src = custom + "://" + custom;
また :
window.location = custom + "://" + custom;
Ps :ところで、埋め込まれた webview で src を変更しても機能しないようです。ここのスタックに関する他の記事で明らかになったように