Skip to content
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

Warn about use of jQuery.style #156

Open
dmethvin opened this issue Mar 5, 2016 · 6 comments
Open

Warn about use of jQuery.style #156

dmethvin opened this issue Mar 5, 2016 · 6 comments
Assignees

Comments

@dmethvin
Copy link
Member

dmethvin commented Mar 5, 2016

It's undocumented but that's never stopped anyone.

jquery/jquery#2297

@mgol
Copy link
Member

mgol commented Mar 5, 2016

👍 Since it's not going anywhere before 3.1.0, though, it doesn't have to make it to Migrate 3.0.

@dmethvin
Copy link
Member Author

Since it's hard to detect which usages are inside jQuery core itself, I am thinking we want to defer this until jQuery core is refactored. Then we can put in a shim to add jQuery.style back in Migrate.

@dmethvin dmethvin self-assigned this Mar 29, 2016
@dmethvin dmethvin added this to the 3.1.0 milestone Mar 29, 2016
@dmethvin dmethvin removed this from the 3.1.0 milestone Jul 11, 2016
@dmethvin
Copy link
Member Author

I removed the milestone because this isn't really possible until we refactor to remove any internal uses of jQuery.style. Otherwise it will give warnings due to jQuery's own use. In some minor jQuery 3.x release we should refactor the code but will need to leave jQuery.style exposed at least until 4.0.

@mgol
Copy link
Member

mgol commented Jul 13, 2016

Technically we're in the clear as jQuery.style is undocumented, we've
hidden some undocumented APIs in 1.12/2.2. Do you think it might be used
too much?

Michał Gołębiowski

@dmethvin
Copy link
Member Author

Each time jQuery.style is called we'd generate a warning. Even if nobody outside jQuery calls it, our internal calls would mean the warning is generated. We could do like we've done before and pre-hook the methods where we know jQuery calls it internally, then set a flag saying the next call should not warn, but that's really messy IMO. It would be nicer to refactor jQuery to use an internal function and only expose it until the next major.

@mgol
Copy link
Member

mgol commented Jul 13, 2016

I agree that Migrate can't warn about it as long as we use it internally. I only said that we can remove this method earlier than in jQuery 4.0 as it's undocumented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants