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

Fastboot compatibility #1

Merged
merged 3 commits into from Feb 10, 2016
Merged

Fastboot compatibility #1

merged 3 commits into from Feb 10, 2016

Conversation

@ronco
Copy link
Owner

ronco commented Feb 4, 2016

Manually construct head component (for fastboot).

Instantiating the component automatically through the container throws an exception under fastboot because a new DomHelper is created which relies upon document.

For full functionality we will also need an index.html placeholder, and updates to ember-fastboot-server to serialize the head component.

@rwjblue
rwjblue reviewed Feb 4, 2016
View changes
addon/instance-initializers/head.js Outdated
);
component.appendTo('head');
const componentFactory =
instance.__container__.lookupFactory('component:head-content');

This comment has been minimized.

Copy link
@rwjblue

rwjblue Feb 4, 2016

Collaborator

use instance._lookupFactory instead

This comment has been minimized.

Copy link
@ronco

ronco Feb 4, 2016

Author Owner

👍

@rwjblue
rwjblue reviewed Feb 4, 2016
View changes
addon/instance-initializers/head.js Outdated
// explicitly set renderer & domhelper in case we're in fastboot
const component = componentFactory.create({
renderer,
container,

This comment has been minimized.

Copy link
@rwjblue

rwjblue Feb 4, 2016

Collaborator

This isn't quite right in 2.3.0+.

Would need to do:

const component = componentFactory.create(
  instance.ownerInjection(), 
  {
    renderer,
    _domHelper: renderer._dom
  }
});
@rwjblue
Copy link
Collaborator

rwjblue commented Feb 4, 2016

Left a few nit-picks, but looks good otherwise.

@ronco
Copy link
Owner Author

ronco commented Feb 5, 2016

Thanks! It'll be a couple days till I can work on this again, but I'll try
to have it all buttoned up before next weeks hangout.
On Thu, Feb 4, 2016 at 4:35 PM Robert Jackson notifications@github.com
wrote:

Left a few nit-picks, but looks good otherwise.


Reply to this email directly or view it on GitHub
#1 (comment).

@ronco ronco force-pushed the feature/fastboot-compat branch 3 times, most recently Feb 9, 2016
@ronco ronco force-pushed the feature/fastboot-compat branch to 673de64 Feb 10, 2016
If FastBoot isn't found in the sandbox go ahead and straightup lookup
the component, this keeps things compatible in older ember versions.
ronco added a commit that referenced this pull request Feb 10, 2016
Fastboot compatibility
@ronco ronco merged commit a32b5a0 into master Feb 10, 2016
2 checks passed
2 checks passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
@ronco ronco deleted the feature/fastboot-compat branch Feb 10, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.