What does “enable DOM storage API” mean?

前端 未结 2 586
没有蜡笔的小新
没有蜡笔的小新 2020-12-29 03:58

I came across this Android WebView function WebSettings.setDomStorageEnabled(true) and from the name alone I can infer that it simply \"enables DOM storage\".

2条回答
  •  [愿得一人]
    2020-12-29 04:37

    1. No. You will have to use it to enable some features of JS functionality as well.

    2. devloper.android link:
      http://developer.android.com/reference/android/webkit/WebSettings.html#setDomStorageEnabled%28boolean%29/

      MDN explnation about DOM storage: https://developer.mozilla.org/en-US/docs/Web/Guide/API/DOM/Storage

    3. You need to know there are security attacks that can be made (if you use it with js).

    4. It opens some security vulnerabilities of the system.

提交回复
热议问题