* 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
()
| 1620 | */ |
| 1621 | |
| 1622 | function localstorage() { |
| 1623 | try { |
| 1624 | // TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context |
| 1625 | // The Browser also has localStorage in the global context. |
| 1626 | return localStorage; |
| 1627 | } catch (error) { |
| 1628 | // Swallow |
| 1629 | // XXX (@Qix-) should we be logging these? |
| 1630 | } |
| 1631 | } |
| 1632 | |
| 1633 | module.exports = requireCommon()(exports); |
| 1634 |