-
Notifications
You must be signed in to change notification settings - Fork 2
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
Integrate into Can proper #19
Comments
It would be good to describe how can-dom-mutate differs from the can-util API. I know that it's a different API, but how is it different? Given a couple of code examples of how something was used in can-util and how they would now be used with can-dom-mutate would help me to understand the difference. |
@matthewp For 3.x, the can-util API would not change by adopting CDM under the hood. For 4.x, can-util/dom/events would hopefully be replaced with can-dom-events. In either case, the way you add these listeners stays the same (because the events support both can-util and can-dom-events styles via the compat). The potential breakage would removing them from can-util outright. |
Can you still give some code examples? Assume I don't know what the can-util/dom/events api is (I only have a vague memory of it, tbh). |
import canEvents from 'can-util/dom/events'
import 'can-util/dom/events/removed/removed'
var myDomNode
canEvents.addEventListener.call(myDomNode, 'removed', function () {}) Nothing changes and in 4.0 it could be completed removed. |
Benefits:
Risks:
|
I think this is fine to proceed with 👍 |
3.x Changes:
|
4.0 Steps:
|
Looking at the current trace data for can@major, I see the following packages dependent on can-util/dom/mutate, can-util/events, can-util/events/{mutation}, and can-util/dom/data and can-dom-data-state:
I will work on branches off of respective major branches with the branch name |
Here's my order: can-event-queue
can-view-nodelist
can-view-target
can-view-callbacks
can-event-dom-enter
can-event-dom-radiochange
can-view-model
can-view-live
can-control
can-stache
can-stache-bindings
can-component
can-view-import
can-connect |
Base: The track list:
TODO |
This issue articulates the changes and schedule to get
can-dom-mutate
integrated into CanJs.Effected packages, ordered by what will be touched first:
3.0 Schedule
can-dom-data
andcan-globals
can-util/dom/events/${inserted/removed/attributes}
and see CDM is a drop in replacement for can-util and full canjs; tweak to match existing behavior (potentially creating a one-off module in CDM to patch the differences)removed
event works as expectedcan-simple-dom
should just work as well but we can run some tests perhaps)4.0 Schedule
4.0+ Schedule
Let me know if I am missing any packages/pieces that will need to be addressed.
@justinbmeyer @matthewp @phillipskevin
The text was updated successfully, but these errors were encountered: