Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ember-disable-prototype-extensions to addons by default. #3645

Conversation

rwjblue
Copy link
Member

@rwjblue rwjblue commented Mar 25, 2015

Add here: https://github.com/rwjblue/ember-disable-prototype-extensions

Basically, just adds window.EmberENV.EXTEND_PROTOTYPES = false; before Ember is loaded.

Fixes #3443.

stefanpenner added a commit that referenced this pull request Mar 25, 2015
…ensions-to-addons

Add ember-disable-prototype-extensions to addons by default.
@stefanpenner stefanpenner merged commit b88793c into ember-cli:master Mar 25, 2015
@stefanpenner stefanpenner deleted the add-ember-disable-prototype-extensions-to-addons branch March 25, 2015 17:04
@runspired
Copy link
Contributor

So this snuck past me on the package.json diff and ended up biting me pretty hard tonight. The errors you get when you aren't looking for this are pretty cryptic, and I only figured this out because I'd read some of the discussion that this was coming, I didn't realize it was landing.

Most of the conversions are simple (I didn't have enough of them to need to use the Watson tool for this guy) http://guides.emberjs.com/v1.10.0/configuring-ember/disabling-prototype-extensions/

But I don't see a clear way to replace .on.

@rwjblue
Copy link
Member Author

rwjblue commented Apr 1, 2015

@runspired:

import Ember from 'ember';
var on = Ember.on;

export default Ember.Component.extend({
  doStuffWhenInserted: on('didInsertElement', function() {
    /* awesome sauce */
  });
})

@rwjblue
Copy link
Member Author

rwjblue commented Apr 1, 2015

Submitted a pull request to the guides for this: emberjs/guides#156

@runspired
Copy link
Contributor

Awesome! Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Set prototype extensions to false by default for addons
4 participants