* Localstorage attempts to return the localstorage. * * This is necessary because safari throws * when a user disables cookies/localstorage * and you attempt to access it. * * @return {LocalStorage} * @api private
()
| 2969 | */ |
| 2970 | |
| 2971 | function localstorage() { |
| 2972 | try { |
| 2973 | // TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context |
| 2974 | // The Browser also has localStorage in the global context. |
| 2975 | return localStorage; |
| 2976 | } catch (error) { |
| 2977 | // Swallow |
| 2978 | // XXX (@Qix-) should we be logging these? |
| 2979 | } |
| 2980 | } |
| 2981 | module.exports = common(exports); |
| 2982 | var formatters = module.exports.formatters; |
| 2983 |