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-EVENT removed in live bindings doesn't unbind #1112

Closed
moschel opened this Issue Jun 25, 2014 · 2 comments

Comments

Projects
None yet
3 participants
@moschel
Contributor

moschel commented Jun 25, 2014

Is this something we want to support?

<div {{#if flag}}can-click='foo'{{/if}}>Click</div>

Right now, if flag gets set to true, then false, the event handler still attempts to run, but throws an error.

To support this, we'd need an opposite method to can.view.attr like can.view.attrRemoved which is called whenever a certain attribute is removed from the page.

@justinbmeyer

This comment has been minimized.

Show comment
Hide comment
@justinbmeyer

justinbmeyer Jun 25, 2014

Contributor

We already have an event when that happens - attributes. No need for another API.

However, live binding will have to call can.view.attr when the attr is added back.

Sent from my iPhone

On Jun 25, 2014, at 12:37 AM, Brian Moschel notifications@github.com wrote:

Is this something we want to support?

Click

Right now, if flag gets set to true, then false, the event handler still attempts to run, but throws an error.

To support this, we'd need an opposite method to can.view.attr like can.view.attrRemoved which is called whenever a certain attribute is removed from the page.


Reply to this email directly or view it on GitHub.

Contributor

justinbmeyer commented Jun 25, 2014

We already have an event when that happens - attributes. No need for another API.

However, live binding will have to call can.view.attr when the attr is added back.

Sent from my iPhone

On Jun 25, 2014, at 12:37 AM, Brian Moschel notifications@github.com wrote:

Is this something we want to support?

Click

Right now, if flag gets set to true, then false, the event handler still attempts to run, but throws an error.

To support this, we'd need an opposite method to can.view.attr like can.view.attrRemoved which is called whenever a certain attribute is removed from the page.


Reply to this email directly or view it on GitHub.

@moschel

This comment has been minimized.

Show comment
Hide comment
@moschel

moschel Dec 1, 2014

Contributor

related to #1182

Contributor

moschel commented Dec 1, 2014

related to #1182

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