Skip to content

Add jQuery 4 compatibility #263

@vpavic

Description

@vpavic

The latest release (1.3.4) does not appear to be compatible with the recently released jQuery 4.

While attempting to upgrade, I'm seeing the following error:

Uncaught TypeError: _.isFunction is not a function
    parse bloodhound.js:702
    Bloodhound2 bloodhound.js:836

Looking at the jQuery 4 release announcement blog post, there are a number of previously deprecated APIs that have been removed:

Deprecated APIs removed

These functions have been deprecated for several versions. It’s time to remove them now that we’ve reached a major release. These functions were either always meant to be internal or ones that now have native equivalents in all supported browsers. The removed functions include:

jQuery.isArray, jQuery.parseJSON, jQuery.trim, jQuery.type, jQuery.now, jQuery.isNumeric, jQuery.isFunction, jQuery.isWindow, jQuery.camelCase, jQuery.nodeName, jQuery.cssNumber, jQuery.cssProps, and jQuery.fx.interval.

Use native equivalents like Array.isArray(), JSON.parse(), String.prototype.trim(), and Date.now() instead.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions