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

can.view returns a renderer function that returns a string #608

Closed
wants to merge 23 commits into
base: master
from

Conversation

Projects
None yet
4 participants
@daffl
Contributor

daffl commented Dec 13, 2013

Here is a fiddle demonstrating the problem: http://jsfiddle.net/fQD3w/1/

From the documentation I would expect the renderer to always return a document fragment.

@daffl

This comment has been minimized.

Show comment
Hide comment
@daffl

daffl Dec 12, 2013

Contributor
Contributor

daffl commented Dec 12, 2013

@daffl

This comment has been minimized.

Show comment
Hide comment
@daffl

daffl Dec 13, 2013

Contributor

I submitted a fix for the issue. However I also had to change some of the other tests because they were assuming that normal text would be returned instead of a document fragment. For that reason I will bump this to 2.1. From experience we can generally say, that if the tests already assume things working a certain way, other users will do so as well.

Contributor

daffl commented Dec 13, 2013

I submitted a fix for the issue. However I also had to change some of the other tests because they were assuming that normal text would be returned instead of a document fragment. For that reason I will bump this to 2.1. From experience we can generally say, that if the tests already assume things working a certain way, other users will do so as well.

return $view.frag(renderer.render.apply(this, arguments));
}
renderer.render = function() {
return textRenderer.apply(textRenderer, arguments);

This comment has been minimized.

@daffl

daffl Dec 16, 2013

Contributor

Shoot, this should be textRenderer.apply(this, arguments);

@daffl

daffl Dec 16, 2013

Contributor

Shoot, this should be textRenderer.apply(this, arguments);

@daffl

This comment has been minimized.

Show comment
Hide comment
@daffl

daffl Jan 22, 2014

Contributor

Closing PR. Targetting for minor branch.

Contributor

daffl commented Jan 22, 2014

Closing PR. Targetting for minor branch.

@daffl daffl closed this Jan 22, 2014

@justinbmeyer

This comment has been minimized.

Show comment
Hide comment
@justinbmeyer

justinbmeyer Jan 30, 2014

Contributor

Did this include any docs?

Contributor

justinbmeyer commented Jan 30, 2014

Did this include any docs?

@justinbmeyer

This comment has been minimized.

Show comment
Hide comment
@justinbmeyer

justinbmeyer Feb 4, 2014

Contributor

@andykant instead of calling new scope(), you could probably do:

scope.prototype instanceof can.Map
Contributor

justinbmeyer commented on component/component.js in 83e936c Feb 4, 2014

@andykant instead of calling new scope(), you could probably do:

scope.prototype instanceof can.Map

This comment has been minimized.

Show comment
Hide comment
@justinbmeyer

justinbmeyer Feb 4, 2014

Contributor

Also, you might have tried this after this.Map was set. applyAttributeScopeMappings would probably only have to be called once.

Contributor

justinbmeyer replied Feb 4, 2014

Also, you might have tried this after this.Map was set. applyAttributeScopeMappings would probably only have to be called once.

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