Skip to content

Instantly share code, notes, and snippets.

@joliss
Created June 10, 2012 23:32
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joliss/246bbf7305e09ed7ce80 to your computer and use it in GitHub Desktop.
Save joliss/246bbf7305e09ed7ce80 to your computer and use it in GitHub Desktop.
elementIsInserted - encapsulating because this.state === 'inDOM' might break in the future
Ember.View.reopen({
elementIsInserted: Ember.computed(function() {
return this.getPath('renderStates.currentState.name') === 'inDOM';
}).property().volatile()
});
@mattkime
Copy link

thanks, very helpful!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment