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

Core: Fill in & warn against jQuery.proxy #530

Merged
merged 1 commit into from
Oct 28, 2024
Merged

Core: Fill in & warn against jQuery.proxy #530

merged 1 commit into from
Oct 28, 2024

Conversation

mgol
Copy link
Member

@mgol mgol commented Sep 16, 2024

Fixes gh-460

@mgol mgol added this to the 3.6.0 milestone Sep 16, 2024
@mgol mgol self-assigned this Sep 16, 2024
@mgol mgol force-pushed the proxy branch 3 times, most recently from ddfd99f to 1aba980 Compare September 16, 2024 16:30
Comment on lines +27 to +38
function isFunction( obj ) {

// Support: Chrome <=57, Firefox <=52
// In some browsers, typeof returns "function" for HTML <object> elements
// (i.e., `typeof document.createElement( "object" ) === "function"`).
// We don't want to classify *any* DOM node as a function.
// Support: QtWeb <=3.8.5, WebKit <=534.34, wkhtmltopdf tool <=0.12.5
// Plus for old WebKit, typeof returns "function" for HTML collections
// (e.g., `typeof document.getElementsByTagName("div") === "function"`). (gh-4756)
return typeof obj === "function" && typeof obj.nodeType !== "number" &&
typeof obj.item !== "function";
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll remove this wrapper in Migrate 4.0 as a regular typeof will suffice then.

@mgol mgol merged commit b27d032 into jquery:main Oct 28, 2024
11 checks passed
@mgol mgol deleted the proxy branch October 28, 2024 18:04
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

Successfully merging this pull request may close these issues.

Patch & warn against jQuery.proxy
2 participants