lib/lawnchair.js
function () {
            return !!storage && function() {
              // in mobile safari if safe browsing is enabled, window.storage
              // is defined but setItem calls throw exceptions.
              var success = true
              var value = Math.random()
              try {
                storage.setItem(value, value)
              } catch (e) {
                success = false
              }
              storage.removeItem(value)
              return success
            }()
        }
function () {
            return !!storage && function() {
              // in mobile safari if safe browsing is enabled, window.storage
              // is defined but setItem calls throw exceptions.
              var success = true
              var value = Math.random()
              try {
                storage.setItem(value, value)
              } catch (e) {
                success = false
              }
              storage.removeItem(value)
              return success
            }()
        }
function ( ) { return ! ! storage && function ( ) { // in mobile safari if safe browsing is enabled, window.storage // is defined but setItem calls throw exceptions. var success = true var value = Math . random ( ) try { storage . setItem ( value , value ) } catch ( e ) { success = false } storage . removeItem ( value ) return success } ( ) }
ensure we are in an env with localStorage
ensure we are in an env with localStorage