首页 > 解决方案 > jquery history js无法读取未定义的属性'msie'

问题描述

我将 jquery 从 1.9.2 升级到 v3.5.1,并使用了 migrate v 3.3.2。当我现在填充这个时,我从我的 jquery 历史 js 页面中得到一个错误。它把它扔在下面的代码行上

var self = $.extend({}, implementations.base);

    if ($.browser.msie && ($.browser.version < 8 || document.documentMode < 8)) { // errors out here
        self.type = 'iframeTimer';
    } else if ("onhashchange" in window) {
        self.type = 'hashchangeEvent';
    } else {
        self.type = 'timer';
    }

    $.extend(self, implementations[self.type]);
    $.history = self;

我已经检查并且不再支持 jquery 历史记录,但我需要使用我目前拥有的版本,因为它已针对网站进行了修改。我怎样才能解决这个问题?在此处输入图像描述

标签: jqueryjquery-uijquery-plugins

解决方案


推荐阅读