UE报错:Uncaught TypeMismatchError: Failed to execute 'removeAttributeNode' on 'Element'解决方案
来源:互联网 发布:matlab求矩阵的最小值 编辑:程序博客网 时间:2024/05/21 15:49
<span style="font-size:14px;">适用UE富文本编辑器的时候,报错:Uncaught TypeMismatchError: Failed to execute 'removeAttributeNode' on 'Element': The 1st argument provided is either null, or an invalid Attr object.</span>
解决办法:
打开报错文件,文件有两种,一种是压缩过的,一种是未压缩过的
未压缩的:解决方法,打开报错的js文件,查到以下代码(或者报错的地方):
1switch (ci) {
2 case 'className':
3 node[ci] = '';
4 break;
5 case 'style':
6 node.style.cssText = '';
7 !browser.ie && node.removeAttributeNode(node.getAttributeNode('style'))
8}
加一个 if 判断:
01switch (ci) {
02 case 'className':
03 node[ci] = '';
04 break;
05 case 'style':
06 node.style.cssText = '';
07 if (node.getAttributeNode('style') !== null) { // 加判断
08 !browser.ie && node.removeAttributeNode(node.getAttributeNode('style'))
09 }
10}
1switch(d){case "className":a[d]="";break;case "style":a.style.cssText="",!m.ie&&a.removeAttributeNode(a.getAttributeNode("style"))}
改成:
1switch(d){case "className":a[d]="";break;case "style":a.style.cssText="";if(a.getAttributeNode("style")!==null){!m.ie&&a.removeAttributeNode(a.getAttributeNode("style"))}}
注意 a.style.cssText=”" 后面的逗号改成分号。
友情声明:这里需要注意的是,代码某些部分根据UE的版本不同,名字也不近相同,比如:有的版本中,压缩后的d变成了a。基本上大同小异,大家仔细一下就知道了。
0 0
- UE报错:Uncaught TypeMismatchError: Failed to execute 'removeAttributeNode' on 'Element'解决方案
- Ueditor一加载就报Uncaught TypeMismatchError: Failed to execute 'removeAttributeNode' on 'Element'
- ueditor编辑器无法粘人表格,Uncaught TypeMismatchError: Failed to execute ‘removeAttributeNode’ on ‘Element’: T
- ueditor 一点击“清除格式” 就报错(Failed to execute 'removeAttributeNode' on 'Element':)
- Uncaught SecurityError: Failed to execute 'replaceState' on 'History':解决方案
- 报错:Uncaught SecurityError: Failed to execute 'getImageData' on 'CanvasRenderingContext2D': The canva
- Uncaught SyntaxError: Failed to execute 'querySelectorAll' on 'Element': '#00' is not a valid select
- Uncaught InvalidCharacterError: Failed to execute 'setAttribute' on 'Element': '"' is not a valid at
- Uncaught SyntaxError: Failed to set the 'innerHTML' property on 'Element'
- Uncaught NetworkError: Failed to execute 'send' on 'XMLHttpRequest': Failed to load 'file:///E:/test
- Ext submit时报错 Failed to execute 'appendChild' on 'Node': The new child element is null.
- Uncaught TypeError: Failed to execute 'removeChild' on 'Node': 1 argument required, but only 0 prese
- Uncaught TypeError: Failed to execute 'appendChild' on 'Node': parameter 1 is not of type 'Node 解决办法
- Uncaught DOMException: Failed to execute 'insertBefore' on 'Node': The node before which the new nod
- AJAX请求在微信环境报错:NetworkError: Failed to execute 'send' on 'XMLHttpRequest': Failed to load
- swiper轮播插件出现Uncaught TypeError: Failed to execute 'observe' on 'MutationObserver': parameter 1 is no
- Hive On Spark报错:Failed to execute spark task, org.apache.hadoop.hive.ql.metadata.HiveException
- maven3打包报错Failed to execute goal on project testaa: Could not resolve dependencies for project
- OAuth2集成——《跟我学Shiro》
- 使用Jquery.mobile制造手机网页
- 有用资源的整理集合
- Qt编译出错问题:out of memory allocating 1073745919 bytes
- 程序员如何正确的评估自己的薪资
- UE报错:Uncaught TypeMismatchError: Failed to execute 'removeAttributeNode' on 'Element'解决方案
- 【Xcode学C-3】if等流程控制、函数的介绍说明标记分组、#include以及LLVM
- 【BZOJ】【P1858】【Scoi2010】【序列操作】【题解】【线段树】
- Linux 下挂载硬盘的 方法
- ural 1225.Flags(简单dp)
- Android手机软键盘遮盖输入框之重新布局详解
- 独立开发者低成本推广APP的18条技巧
- oracle数据库获取自然周,按照1月1号到第一个周日为第一周
- PHP5.3与5.5废弃与过期函数整理汇总