Do not expose jQuery.domManip method #2225

Closed
markelog opened this Issue Apr 21, 2015 · 13 comments

Comments

Projects
None yet
5 participants
@markelog
Member

markelog commented Apr 21, 2015

Since we get this opportunity only in major version, i'm gonna label it as a blocker

@markelog markelog added this to the 3.0.0 milestone Apr 21, 2015

@timmywil timmywil self-assigned this May 5, 2015

@timmywil timmywil closed this in 62d5579 May 5, 2015

@justinbmeyer

This comment has been minimized.

Show comment
Hide comment
@justinbmeyer

justinbmeyer Jul 15, 2015

Contributor

Sorry about the late comment, but this is important for CanJS.

https://github.com/bitovi/canjs/blob/master/util/jquery/jquery.js#L140

It's how we are able to add an "inserted" event everytime new DOM is added to the page.

Anyway, this could be made public again in future releases?

Contributor

justinbmeyer commented Jul 15, 2015

Sorry about the late comment, but this is important for CanJS.

https://github.com/bitovi/canjs/blob/master/util/jquery/jquery.js#L140

It's how we are able to add an "inserted" event everytime new DOM is added to the page.

Anyway, this could be made public again in future releases?

@dmethvin

This comment has been minimized.

Show comment
Hide comment
@dmethvin

dmethvin Jul 15, 2015

Member

@justinbmeyer can you open a ticket for this? I think we should look at the problem from a functionality/capability standpoint rather than just re-exposing this internal method.

Member

dmethvin commented Jul 15, 2015

@justinbmeyer can you open a ticket for this? I think we should look at the problem from a functionality/capability standpoint rather than just re-exposing this internal method.

@dmethvin

This comment has been minimized.

Show comment
Hide comment
@dmethvin

dmethvin Jan 7, 2016

Member

@justinbmeyer is CanJS still using .domManip? Since it's an undocumented method we were planning to remove it in 1.12/2.2 but we can extend that to 3.0 if we hear from you in the next day.

Member

dmethvin commented Jan 7, 2016

@justinbmeyer is CanJS still using .domManip? Since it's an undocumented method we were planning to remove it in 1.12/2.2 but we can extend that to 3.0 if we hear from you in the next day.

@dmethvin dmethvin modified the milestones: 1.12/2.2, 3.0.0 Jan 7, 2016

@justinbmeyer

This comment has been minimized.

Show comment
Hide comment
@justinbmeyer

justinbmeyer Jan 7, 2016

Contributor

Yes, we are still using it. In about 6 months, we are finally dropping support for browsers that don't support MutationEvents/Observers. At that point, we won't need it exposed anymore. Thank you very much for keeping it around.

Contributor

justinbmeyer commented Jan 7, 2016

Yes, we are still using it. In about 6 months, we are finally dropping support for browsers that don't support MutationEvents/Observers. At that point, we won't need it exposed anymore. Thank you very much for keeping it around.

@dmethvin

This comment has been minimized.

Show comment
Hide comment
@dmethvin

dmethvin Jan 8, 2016

Member

Reopening as a reminder

Member

dmethvin commented Jan 8, 2016

Reopening as a reminder

@dmethvin dmethvin reopened this Jan 8, 2016

@mgol

This comment has been minimized.

Show comment
Hide comment
@mgol

mgol Jan 8, 2016

Member

The milestone here is a little misleading as we're now planning to drop it only in 3.0.0. :) But OK, it's a good reminder and we can bump the milestone back later.

Member

mgol commented Jan 8, 2016

The milestone here is a little misleading as we're now planning to drop it only in 3.0.0. :) But OK, it's a good reminder and we can bump the milestone back later.

@dmethvin

This comment has been minimized.

Show comment
Hide comment
@dmethvin

dmethvin Jan 8, 2016

Member

All the "Do not expose" tickets may need to be re-exposed for 1.12/2.2 but I figured we should discuss. Rather than reverting the commits it would be easier to simply re-expose each via something like jQuery.domManip = domManip and a comment that the method is deprecated and will be removed in 3.0.

Member

dmethvin commented Jan 8, 2016

All the "Do not expose" tickets may need to be re-exposed for 1.12/2.2 but I figured we should discuss. Rather than reverting the commits it would be easier to simply re-expose each via something like jQuery.domManip = domManip and a comment that the method is deprecated and will be removed in 3.0.

timmywil added a commit that referenced this issue Jan 8, 2016

timmywil added a commit that referenced this issue Jan 8, 2016

@timmywil

This comment has been minimized.

Show comment
Hide comment
@timmywil

timmywil Jan 8, 2016

Member

Fixed in 1.12/2.2

Member

timmywil commented Jan 8, 2016

Fixed in 1.12/2.2

@timmywil timmywil closed this Jan 8, 2016

@timmywil timmywil modified the milestones: 3.0.0, 1.12.0/2.2.0 Jan 8, 2016

@timmywil

This comment has been minimized.

Show comment
Hide comment
@timmywil

timmywil Jan 8, 2016

Member

Changed milestone back to 3.0 as they're still going to be privatized in 3.0.

Member

timmywil commented Jan 8, 2016

Changed milestone back to 3.0 as they're still going to be privatized in 3.0.

@justinbmeyer

This comment has been minimized.

Show comment
Hide comment
@justinbmeyer

justinbmeyer Jan 8, 2016

Contributor

@dmethvin I should have noticed this earlier today. But I need to overwrite domManip so I can get a hook for anytime jQuery modifies the dom. Simply exposing the method doesn't work because changing jQuery.fn.domManip doesn't effect all of jQuery's calls to domManip.

Is there anyway to get this changed, so that $.fn.domManip is being called eveywhere?

(this hook is far more important than buildFragment, it supports our "inserted" and "removed" custom events).

Contributor

justinbmeyer commented Jan 8, 2016

@dmethvin I should have noticed this earlier today. But I need to overwrite domManip so I can get a hook for anytime jQuery modifies the dom. Simply exposing the method doesn't work because changing jQuery.fn.domManip doesn't effect all of jQuery's calls to domManip.

Is there anyway to get this changed, so that $.fn.domManip is being called eveywhere?

(this hook is far more important than buildFragment, it supports our "inserted" and "removed" custom events).

@dmethvin

This comment has been minimized.

Show comment
Hide comment
@dmethvin

dmethvin Jan 8, 2016

Member

I think this would need to be discussed with the team. Is this a temporary reprieve for 1.x/2.x, or do you need a feature to hook DOM changes for 3.0 as well? We're not planning on anything other than patch releases for 1.x/2.x from here on out and weren't expecting to expose any of these for 3.0.

Member

dmethvin commented Jan 8, 2016

I think this would need to be discussed with the team. Is this a temporary reprieve for 1.x/2.x, or do you need a feature to hook DOM changes for 3.0 as well? We're not planning on anything other than patch releases for 1.x/2.x from here on out and weren't expecting to expose any of these for 3.0.

@justinbmeyer

This comment has been minimized.

Show comment
Hide comment
@justinbmeyer

justinbmeyer Jan 8, 2016

Contributor

A temporary reprieve. CanJS 3.0 will start using MutationObservers. It will be able to support "inserted" and "removed" events without hijacking jQuery.

I could work around this by overwriting all of jQuery's modifier methods. However, I'd need $.buildFragment to be able to convert the string arguments to a fragment.

Contributor

justinbmeyer commented Jan 8, 2016

A temporary reprieve. CanJS 3.0 will start using MutationObservers. It will be able to support "inserted" and "removed" events without hijacking jQuery.

I could work around this by overwriting all of jQuery's modifier methods. However, I'd need $.buildFragment to be able to convert the string arguments to a fragment.

@justinbmeyer justinbmeyer referenced this issue in canjs/canjs Jan 9, 2016

Closed

jQuery 2.2 compatible. #2176

@justinbmeyer

This comment has been minimized.

Show comment
Hide comment
@justinbmeyer

justinbmeyer Jan 10, 2016

Contributor

@dmethvin I'm able to work around this. So no need to add it back.

Contributor

justinbmeyer commented Jan 10, 2016

@dmethvin I'm able to work around this. So no need to add it back.

@sqrthree sqrthree referenced this issue in sqrthree/sqrthree.github.io Feb 20, 2016

Open

[译] jQuery 3.0 以及兼容版的 Alpha 版本发布 #3

@cssmagic cssmagic referenced this issue in cssmagic/ChangeLog May 18, 2016

Open

jQuery #5

@jquery jquery locked as resolved and limited conversation to collaborators Jun 19, 2018

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