Skip to content

Conversation

@fredj
Copy link
Contributor

@fredj fredj commented Oct 21, 2014

This PR suggests to fix the signature of the jquery filter parameter; the function callback takes a number and an Element in argument, not only a number.

See http://api.jquery.com/filter/#filter-function

fredj added a commit to fredj/openlayers that referenced this pull request Nov 4, 2014
fredj added a commit to geoadmin/ol3 that referenced this pull request Nov 6, 2014
@fredj
Copy link
Contributor Author

fredj commented Dec 9, 2014

@MatrixFrog
Copy link
Contributor

Chad/John, did you have any comments on this? I'm pretty sure this won't break anyone because the typechecker treats function(number) as a subtype of function(number, Element) right?

@ChadKillingsworth
Copy link
Collaborator

If we are concerned about existing code, we can mark it as

function(number, Element=)

It's a callback function, so the arguments being optional would make sense.

@MatrixFrog
Copy link
Contributor

I'm pretty sure this won't break anyone, and we can rollback if I'm wrong :)

MatrixFrog added a commit that referenced this pull request Dec 9, 2014
Fix filter() function parameter in jquery externs
@MatrixFrog MatrixFrog merged commit 4c42469 into google:master Dec 9, 2014
@fredj fredj deleted the jquery_filter_extern branch December 15, 2014 11:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants