无法读取null的属性'removeAttribute':无法找到它的来源 [英] Cannot read property 'removeAttribute' of null: Cant find source of it

查看:210
本文介绍了无法读取null的属性'removeAttribute':无法找到它的来源的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在每个网站上一遍又一遍地收到错误:

Im getting errors over and over again on each of my sites:

VM42958:5 Uncaught TypeError: Cannot read property 'removeAttribute' of null
(anonymous function) @ VM42958:5
(anonymous function) @ VM42958:20

不幸的是我无法找到此错误的来源。如果我打开相关的JavaScript行,我会发现以下内容:

Unfortunately i cant find the source of this error. If i open the related JavaScript lines i find the following:

VM42958

(function()
{
  var style = document.getElementById("9mr7n8lmeyjxk84i17g5ws714i") ||
              document.documentElement.shadowRoot.getElementById("9mr7n8lmeyjxk84i17g5ws714i");
  style.removeAttribute("id");
  Object.defineProperty(style, "disabled", {value: false, enumerable: true});
  Object.defineProperty(style.sheet, "disabled", {value: false, enumerable: true});
  var deleteRule = CSSStyleSheet.prototype.deleteRule;
  CSSStyleSheet.prototype.deleteRule = function(index)
  {
    if (this != style.sheet)
      deleteRule.call(this, index);
  }
  var removeRule = CSSStyleSheet.prototype.removeRule;
  CSSStyleSheet.prototype.removeRule = function(index)
  {
    if (this != style.sheet)
      removeRule.call(this, index);
  }
})();

这不是我的代码,我不知道它来自何处或何处使用。作为库使用bootstrap,jQuery和Chart.js。

This is not my code and i have no idea where it is comming from or where it is used. As libraries im using bootstrap, jQuery and Chart.js.

有人知道这部分代码还是有办法找到这个错误的来源。我的意思是直接出现它出现的那条线?

Does somebody know this part of code or is there a way to find the source of this error. i mean directly the line where it is appearing?

在这个jsFiddle中出现同样的错误,例如: jsFiddle

The same error occurs in this jsFiddle for example: jsFiddle

推荐答案

此处存在同样的问题。
出于某种原因,Chrome ADBlock(不是加号)是原因。

Same problem here. For some reason Chrome ADBlock (not plus) was the cause.

这篇关于无法读取null的属性'removeAttribute':无法找到它的来源的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆