Javascript DreamWeavers看到了很多错误,而脚本确实可以使用jQuery3

Javascript DreamWeavers看到了很多错误,而脚本确实可以使用jQuery3,javascript,jquery,syntax-error,warnings,Javascript,Jquery,Syntax Error,Warnings,Dreamweaver用警告将许多线条涂成红色。该脚本与jQuery3完美配合!那么,这些DreamWeaver警告是否应该被忽略,或者(其中的一些)应该被改变,如果是,如何改变?我已经手动写下了它们,因为只有将鼠标悬停在行号上时才能看到 缺少分号(第2行) 使用严格语句(第4行) 预期===但saw==(第10行) 期待==但是我看到了(第23行) 预期和赋值或调用但未看到表达式(第33行) 缺少分号(41) 预期===但saw==(43) 缺少使用严格声明(45) for-in语句的主体应

Dreamweaver用警告将许多线条涂成红色。该脚本与jQuery3完美配合!那么,这些DreamWeaver警告是否应该被忽略,或者(其中的一些)应该被改变,如果是,如何改变?我已经手动写下了它们,因为只有将鼠标悬停在行号上时才能看到

  • 缺少分号(第2行)
  • 使用严格语句(第4行)
  • 预期===但saw==(第10行)
  • 期待==但是我看到了(第23行)
  • 预期和赋值或调用但未看到表达式(第33行)
  • 缺少分号(41)
  • 预期===但saw==(43)
  • 缺少使用严格声明(45)
  • for-in语句的主体应该包装在if语句中,以过滤原型中不需要的属性(46)
  • 预期{但见e(52)
  • 预期===但saw==(53)
  • 期待{但看到(54)
  • 预期{但见e(55)
  • 预期===但saw==(60)
  • 预期和赋值或调用但未看到表达式(70)
  • 预期和赋值或调用,但saw表达式(75)
  • 缺少分号(77)
  • 预期===但saw==(84)
  • 预期和赋值或调用,但saw表达式(92)
  • 应为{但应为(101)
  • 预期和赋值或调用但未看到表达式(103)

!函数(t,e){
“function”==typeof define&&define.amd?define(“ev发射器/ev发射器”,e):“object”==typeof module&&module.exports?module.exports=e():t.EvEmitter=e()
}(这个,函数(){
函数t(){}
var e=t.原型;
返回e.on=函数(t,e){
如果(t&e){
变量i=这个。_事件=这个。_事件| |{},
n=i[t]=i[t]| |[];
return-1==n.indexOf(e)和&n.push(e),这个
}
},e.once=函数(t,e){
如果(t&e){
这个。on(t,e);
变量i=这个。_onceEvents=这个。_onceEvents | |{},
n=i[t]=i[t]| |[];
返回n[e]=!0,此;
}
},e.off=函数(t,e){
var i=此._事件和此._事件[t];
if(i和i.length){
var n=i.indexOf(e);
返回-1!=n&&i.splice(n,1),此
}
},e.emitEvent=函数(t,e){
var i=此._事件和此._事件[t];
if(i和i.length){
var n=0,
o=i[n];
e=e | |[];
对于(var r=this.\u onceEvents&&this.\u onceEvents[t];o;){
var s=r&r[o];
s&&(this.off(t,o),delete r[o]),o.apply(this,e),n+=s?0:1,o=i[n]
}
归还这个;
}
},t;
}),
函数(t,e){
“严格使用”;
“function”==typeof define&&define.amd?define([“ev发射器/ev发射器”],function(i){
返回e(t,i);
}):“对象”==模块类型和模块导出?模块导出=e(t,要求(“ev发射器”):t.imagesLoaded=e(t,t.Evitter)
}(窗口,功能(t,e){
功能i(t,e){
对于(var i in e)t[i]=e[i];
返回t;
}
函数n(t){
var e=[];
if(Array.isArray(t))e=t;
else if(“编号”==t.length的类型)
对于(var i=0;i ! function(t, e) {
    "function" == typeof define && define.amd ? define("ev-emitter/ev-emitter", e) : "object" == typeof module && module.exports ? module.exports = e() : t.EvEmitter = e()
}(this, function() {
    function t() {}
    var e = t.prototype;
    return e.on = function(t, e) {
        if (t && e) {
            var i = this._events = this._events || {},
                n = i[t] = i[t] || [];
            return -1 == n.indexOf(e) && n.push(e), this
        }
    }, e.once = function(t, e) {
        if (t && e) {
            this.on(t, e);
            var i = this._onceEvents = this._onceEvents || {},
                n = i[t] = i[t] || [];
            return n[e] = !0, this;
        }
    }, e.off = function(t, e) {
        var i = this._events && this._events[t];
        if (i && i.length) {
            var n = i.indexOf(e);
            return -1 != n && i.splice(n, 1), this
        }
    }, e.emitEvent = function(t, e) {
        var i = this._events && this._events[t];
        if (i && i.length) {
            var n = 0,
                o = i[n];
            e = e || [];
            for (var r = this._onceEvents && this._onceEvents[t]; o;) {
                var s = r && r[o];
                s && (this.off(t, o), delete r[o]), o.apply(this, e), n += s ? 0 : 1, o = i[n]
            }
            return this;
        }
    }, t;
}),
function(t, e) {
    "use strict";
    "function" == typeof define && define.amd ? define(["ev-emitter/ev-emitter"], function(i) {
        return e(t, i);
    }) : "object" == typeof module && module.exports ? module.exports = e(t, require("ev-emitter")) : t.imagesLoaded = e(t, t.EvEmitter)
}(window, function(t, e) {
    function i(t, e) {
        for (var i in e) t[i] = e[i];
        return t;
    }

    function n(t) {
        var e = [];
        if (Array.isArray(t)) e = t;
        else if ("number" == typeof t.length)
            for (var i = 0; i < t.length; i++) e.push(t[i]);
        else e.push(t);
        return e;
    }

    function o(t, e, r) {
        return this instanceof o ? ("string" == typeof t && (t = document.querySelectorAll(t)), this.elements = n(t), this.options = i({}, this.options), "function" == typeof e ? r = e : i(this.options, e), r && this.on("always", r), this.getImages(), h && (this.jqDeferred = new h.Deferred), void setTimeout(function() {
            this.check();
        }.bind(this))) : new o(t, e, r);
    }

    function r(t) {
        this.img = t;
    }

    function s(t, e) {
        this.url = t, this.element = e, this.img = new Image();
    }
    var h = t.jQuery,
        a = t.console;
    o.prototype = Object.create(e.prototype), o.prototype.options = {}, o.prototype.getImages = function() {
        this.images = [], this.elements.forEach(this.addElementImages, this)
    }, o.prototype.addElementImages = function(t) {
        "IMG" == t.nodeName && this.addImage(t); this.options.background === !0 && this.addElementBackgroundImages(t);
        var e = t.nodeType;
        if (e && d[e]) {
            for (var i = t.querySelectorAll("img"), n = 0; n < i.length; n++) {
                var o = i[n];
                this.addImage(o);
            }
            if ("string" == typeof this.options.background) {
                var r = t.querySelectorAll(this.options.background);
                for (n = 0; n < r.length; n++) {
                    var s = r[n];
                    this.addElementBackgroundImages(s);
                }
            }
        }
    };
    var d = {
        1: !0,
        9: !0,
        11: !0
    };
    return o.prototype.addElementBackgroundImages = function(t) {
        var e = getComputedStyle(t);
        if (e)
            for (var i = /url\((['"])?(.*?)\1\)/gi, n = i.exec(e.backgroundImage); null !== n;) {
                var o = n && n[2];
                o && this.addBackground(o, t), n = i.exec(e.backgroundImage)
            }
    }, o.prototype.addImage = function(t) {
        var e = new r(t);
        this.images.push(e)
    }, o.prototype.addBackground = function(t, e) {
        var i = new s(t, e);
        this.images.push(i)
    }, o.prototype.check = function() {
        function t(t, i, n) {
            setTimeout(function() {
                e.progress(t, i, n)
            })
        }
        var e = this;
        return this.progressedCount = 0, this.hasAnyBroken = !1, this.images.length ? void this.images.forEach(function(e) {
            e.once("progress", t), e.check()
        }) : void this.complete()
    }, o.prototype.progress = function(t, e, i) {
        this.progressedCount++, this.hasAnyBroken = this.hasAnyBroken || !t.isLoaded, this.emitEvent("progress", [this, t, e]), this.jqDeferred && this.jqDeferred.notify && this.jqDeferred.notify(this, t), this.progressedCount == this.images.length && this.complete(), this.options.debug && a && a.log("progress: " + i, t, e)
    }, o.prototype.complete = function() {
        var t = this.hasAnyBroken ? "fail" : "done";
        if (this.isComplete = !0, this.emitEvent(t, [this]), this.emitEvent("always", [this]), this.jqDeferred) {
            var e = this.hasAnyBroken ? "reject" : "resolve";
            this.jqDeferred[e](this)
        }
    }, r.prototype = Object.create(e.prototype), r.prototype.check = function() {
        var t = this.getIsImageComplete();
        return t ? void this.confirm(0 !== this.img.naturalWidth, "naturalWidth") : (this.proxyImage = new Image, this.proxyImage.addEventListener("load", this), this.proxyImage.addEventListener("error", this), this.img.addEventListener("load", this), this.img.addEventListener("error", this), void(this.proxyImage.src = this.img.src))
    }, r.prototype.getIsImageComplete = function() {
        return this.img.complete && void 0 !== this.img.naturalWidth
    }, r.prototype.confirm = function(t, e) {
        this.isLoaded = t, this.emitEvent("progress", [this, this.img, e])
    }, r.prototype.handleEvent = function(t) {
        var e = "on" + t.type;
        this[e] && this[e](t)
    }, r.prototype.onload = function() {
        this.confirm(!0, "onload"), this.unbindEvents()
    }, r.prototype.onerror = function() {
        this.confirm(!1, "onerror"), this.unbindEvents()
    }, r.prototype.unbindEvents = function() {
        this.proxyImage.removeEventListener("load", this), this.proxyImage.removeEventListener("error", this), this.img.removeEventListener("load", this), this.img.removeEventListener("error", this)
    }, s.prototype = Object.create(r.prototype), s.prototype.check = function() {
        this.img.addEventListener("load", this), this.img.addEventListener("error", this), this.img.src = this.url;
        var t = this.getIsImageComplete();
        t && (this.confirm(0 !== this.img.naturalWidth, "naturalWidth"), this.unbindEvents())
    }, s.prototype.unbindEvents = function() {
        this.img.removeEventListener("load", this), this.img.removeEventListener("error", this)
    }, s.prototype.confirm = function(t, e) {
        this.isLoaded = t, this.emitEvent("progress", [this, this.element, e])
    }, o.makeJQueryPlugin = function(e) {
        e = e || t.jQuery, e && (h = e, h.fn.imagesLoaded = function(t, e) {
            var i = new o(this, t, e);
            return i.jqDeferred.promise(h(this))
        })
    }, o.makeJQueryPlugin(), o
});