Difference between allow-navigation and allow-intent

后端 未结 2 704
野趣味
野趣味 2021-02-18 23:09

Does any one know the difference between allow-navigation and allow-intent in cordova whitelist ?

2条回答
  •  忘了有多久
    2021-02-18 23:41

    allow-navigation

    Controls which URLs the WebView itself can be navigated to. Applies to top-level navigations only.

    In other words, this affects links in your HTML/JS code, shown directly in the WebView (which is where your HTML5 app runs).

    allow-intent

    Controls which URLs the app is allowed to ask the system to open.

    This affects requests by native code (typically originating from Cordova plugins) to the native system (Different from a security standpoint, since these requests are not 'sandboxed' in the WebView).

    See here for details and types of configuration
    https://github.com/apache/cordova-plugin-whitelist/blob/master/README.md

提交回复
热议问题