Track tasks and feature requests
Join 36 million developers who use GitHub issues to help identify, assign, and keep track of the features and bug fixes your projects need.
Sign up for free See pricing for teams and enterprisesDon't fill jQuery.cssProps if mapping isn't needed #3986
Comments
This comment has been minimized.
This comment has been minimized.
|
Fixing this is messier than I'd like because we have a unit test making some pretty crazy assertions. I'm not certain that aliasing one standard CSS property to another was the intended use case but that's what we're up against. Just a thought for 4.0.0, do we even need the mapping to vendor-specific properties at that point? |
This comment has been minimized.
This comment has been minimized.
|
@dmethvin The unit test is just checking the mapping, I wouldn't expect anyone in real life aliasing We need the mapping to cache vendor prefixed values which are still used by browsers, although not really for new APIs. There are lots of prefixed properties in IE 9+ and I think it's useful we handle it for users. What we could do is to introduce another internal object that would be consulted if there is no match in Another solution: IIRC Migrate used to differentiate between user calls & jQuery internal ones by setting a certain flag at the beginning of a method that uses the deprecated thing and resetting it at the end (I don't remember what it was). Wouldn't something like that work here? |
dmethvin commentedFeb 23, 2018
While working on jquery/jquery-migrate#291 the tests failed indicating that we are using
jQuery.cssPropsstill in a somewhat insidious way. Each time someone accesses a CSS property we're populating it with properties like{ width: "width" }. That makes it hard for Migrate to warn since just about anything can end up there through no fault of external code. For now I won't land this warning and leave jquery/jquery-migrate#283 open until we can change the logic to only populatejQuery.cssPropswhen it needs to actually change the property name.