LeaVerou / awesomplete

Ultra lightweight, usable, beautiful autocomplete with zero dependencies.

Home Page:http://leaverou.github.io/awesomplete/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Deprecated Method

MatthewSSizemore opened this issue · comments

Within the $.fire event it is using "initEvent()". This has been deprecated.

$.fire = function (target, type, properties) {
        var evt = document.createEvent("HTMLEvents");

        evt.initEvent(type, true, true);

        for (var j in properties) {
            evt[j] = properties[j];
        }

        return target.dispatchEvent(evt);
    };
commented

not an expert in this, but possible change could be this (?):
var evt = new Event (type, {"bubbles":true, "cancelable":true});
document.dispatchEvent(evt);

I'd welcome a PR on this, but don't have the time to do it myself right now.