Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 274680d9 authored by Ben Murdoch's avatar Ben Murdoch
Browse files

Add support for toggling DOM Storage support on and off.

parent a28547d0
Loading
Loading
Loading
Loading
+23 −0
Original line number Diff line number Diff line
@@ -163,6 +163,7 @@ public class WebSettings {
    private boolean         mDatabaseEnabled = false;
    private String          mAppCachePath = "";
    private boolean         mAppCacheEnabled = false;
    private boolean         mDomStorageEnabled = false;

    // Class to handle messages before WebCore is ready.
    private class EventHandler {
@@ -962,6 +963,28 @@ public class WebSettings {
       }
    }

    /**
     * Set whether the DOM storage API is enabled.
     * @param flag boolean True if the WebView should use the DOM storage
     *     API.
     * @hide pending API council.
     */
    public synchronized void setDomStorageEnabled(boolean flag) {
       if (mDomStorageEnabled != flag) {
           mDomStorageEnabled = flag;
           postSync();
       }
    }

    /**
     * Returns true if the DOM Storage API's are enabled.
     * @return True if the DOM Storage API's are enabled.
     * @hide pending API council.
     */
    public synchronized boolean getDomStorageEnabled() {
       return mDomStorageEnabled;
    }

    /**
     * Return the path to where database storage API databases are saved for
     * the current WebView.