我正在使用Cordova在iframe中加载HTML.一切正常,但我需要访问原始HTML中的插件.
原始代码是这样的
navigator.camera.getPicture(onSuccess, onFail);
Run Code Online (Sandbox Code Playgroud)
当我在iframe中加载HTML时,我需要这样做
parent.navigator.camera.getPicture(onSuccess, onFail);
Run Code Online (Sandbox Code Playgroud)
这段代码工作,但我真的需要不要更改原始代码.有人知道如何在iframe中使用cordova插件吗?