Daniel C d2aa127180 localStorage: bring back proxy methods to to window.localStorage. (Fix IE11 issue)
IE11 doesn't handle properly attempts to change methods of the
window.localStorage, attempts to do so will result in the complete break of the
localStorage system for the domain in which it is done - until the user clean
the browser/domain cache.

Therefore, in the web, we don't set Meteor._localStorage to be a reference to
window.localStorage . Instead, we set proxy methods.

This will allow package developers that will find a need to change the behavior
of Meteor._localStorage methods to do so without breaking the localStorage
system on IE11. (e.g. meteorhacks:fast-render)

IE11 (earlier IE versions weren't checked) doesn't handle attempts to replace
methods of window.localStorage with different functions properly.  Such attempt
will result in the String of the function we try to set saved as the function,
destroying the ability to use this function.

I couldn't find a way to tell in advance whether an attempt to set
window.localStorage will result in correct function write or not (I
intentionally avoid browser version detection, which is considered a bad
practice). If such attempt will fail we won't have a way to restore the
original function.

The situation is even worse than that. If for exapmle we'll try to set
window.localStorage.setItem = function () {} the String value 'function () {}'
will be saved instead of the function - not only for the current session, but
as part of the localStorage (!) meaning that we'll have to ask users affected
by this bug to clear the cache to fix the situation.

The following won't work:

```javascript
Meteor._localStorage = window.localStorage // Just to make example clear.
originalSetItem = Meteor._localStorage.setItem
Meteor._localStorage.setItem = function () {}
Meteor._localStorage.setItem = originalSetItem

typeof Meteor._localStorage.setItem -> string
```
2017-07-13 09:17:22 -04:00
2016-06-16 19:13:25 +02:00
2015-08-07 12:44:46 -07:00
2015-07-31 10:56:11 -07:00
2016-10-04 18:34:28 -04:00
2017-07-12 18:43:27 -04:00
2016-05-03 14:47:02 -07:00
2017-06-07 16:18:11 +03:00

Meteor

TravisCI Status CircleCI Status

Meteor is an ultra-simple environment for building modern web applications.

With Meteor you write apps:

  • in pure JavaScript
  • that send data over the wire, rather than HTML
  • using your choice of popular open-source libraries

Try the getting started tutorial.

Next, read the guide or the reference documentation at http://docs.meteor.com/.

Quick Start

On Windows, the installer can be found at https://www.meteor.com/install.

On Linux/macOS, use this line:

curl https://install.meteor.com/ | sh

Create a project:

meteor create try-meteor

Run it:

cd try-meteor
meteor

Developer Resources

Building an application with Meteor?

Interested in helping or contributing to Meteor? These resources will help:

We are hiring! Visit meteor.io/jobs to learn more about working full-time on the Meteor project.

Uninstalling Meteor

Aside from a short launcher shell script, Meteor installs itself inside your home directory. To uninstall Meteor, run:

rm -rf ~/.meteor/
sudo rm /usr/local/bin/meteor

On Windows, just run the uninstaller from your Control Panel.

Description
No description provided
Readme MIT 202 MiB
Languages
JavaScript 91.1%
TypeScript 3.9%
Shell 0.9%
Java 0.7%
Swift 0.7%
Other 2.5%