Skip to content

Instantly share code, notes, and snippets.

@dnegstad
Created December 9, 2014 03:07
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dnegstad/062b84a9c33a51910ec2 to your computer and use it in GitHub Desktop.
Save dnegstad/062b84a9c33a51910ec2 to your computer and use it in GitHub Desktop.
Keeping link-to from blowing up with webcomponent.js polyfills
import Ember from 'ember';
Ember.LinkView.reopen({
layoutName: 'components/link-view'
});
export default {
name: 'link-to',
initialize: function() {}
};
@dnegstad
Copy link
Author

dnegstad commented Dec 9, 2014

So, apparently HTMLBars in the ember 1.10 canary has a weird little issue that only seems to manifest when mixed with the webcomponent.js polyfills. If you have a component that does an implicit {{yield}} by not including a template, HTMLBars falls back to some code you only hit when you don't have a metamorph context in your rendering. In most cases, this turns out fine. When mixed with the webcomponent.js shadow dom polyfills, Firefox and Safari just spin until they die.

The crappy quick fix: override the component to specify a template and gain access to those sweet, sweet morph contexts.

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