Example usage for com.google.gwt.storage.client Storage isSessionStorageSupported

List of usage examples for com.google.gwt.storage.client Storage isSessionStorageSupported

Introduction

In this page you can find the example usage for com.google.gwt.storage.client Storage isSessionStorageSupported.

Prototype

public static boolean isSessionStorageSupported() 

Source Link

Document

Returns true if the sessionStorage part of the Storage API is supported on the running platform.

Usage

From source file:com.seanchenxi.gwt.storage.client.StorageExt.java

License:Apache License

/**
 * Returns a Session Storage.//from  w w w .  jav a2  s  . c o  m
 *
 * @return the sessionStorage instance, or <code>null</code> if Web Storage is NOT supported.
 */
public static StorageExt getSessionStorage() {
    if (sessionStorage == null && Storage.isSessionStorageSupported()) {
        sessionStorage = new StorageExt(Storage.getSessionStorageIfSupported());
    }
    return sessionStorage;
}