UE报错:Uncaught TypeMismatchError: Failed to execute 'removeAttributeNode' on 'Element'解决方案
2014-10-09 09:31
513 查看
<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文件,查到以下代码(或者报错的地方):
1 | switch (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 | } |
01 | switch (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 | } |
1 | switch(d){case "className":a[d]="";break;case "style":a.style.cssText="",!m.ie&&a.removeAttributeNode(a.getAttributeNode("style"))} |
1 | switch(d){case "className":a[d]="";break;case "style":a.style.cssText="";if(a.getAttributeNode("style")!==null){!m.ie&&a.removeAttributeNode(a.getAttributeNode("style"))}} |
友情声明:这里需要注意的是,代码某些部分根据UE的版本不同,名字也不近相同,比如:有的版本中,压缩后的d变成了a。基本上大同小异,大家仔细一下就知道了。
相关文章推荐
- Ueditor一加载就报Uncaught TypeMismatchError: Failed to execute 'removeAttributeNode' on 'Element'
- ueditor编辑器无法粘人表格,Uncaught TypeMismatchError: Failed to execute ‘removeAttributeNode’ on ‘Element’: T
- Uncaught SyntaxError: Failed to execute 'querySelectorAll' on 'Element': '#00' is not a valid select
- 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 InvalidCharacterError: Failed to execute 'setAttribute' on 'Element': '"' is not a valid at
- Uncaught SecurityError: Failed to execute 'replaceState' on 'History':解决方案
- swiper轮播插件出现Uncaught TypeError: Failed to execute 'observe' on 'MutationObserver': parameter 1 is no
- 报错:Uncaught SecurityError: Failed to execute 'getImageData' on 'CanvasRenderingContext2D': The canva
- Ext submit时报错 Failed to execute 'appendChild' on 'Node': The new child element is null.
- Jquery 报错 Uncaught InvalidStateError: Failed to set the 'value' property on 'HTMLInputElement':
- Uncaught DOMException: Failed to execute 'insertBefore' on 'Node': The node before which the new nod
- mysqldump Failed to open file 'xxxl', error: 22 on windows os
- TypeError:'stepUp' called on an object that does not implement interface HTMLInputElement.
- ueditor 一点击“清除格式” 就报错(Failed to execute 'removeAttributeNode' on 'Element':)
- html5 canvas 加载图片错误 SecurityError: Failed to execute 'toDataURL' on 'HTMLCanvasElement'
- Failed to install HelloWorld.apk on device 'emulator-5554! 解决方案
- 解决方案:Failed to install helloworld.apk on device 'emulator-5554'
- Uncaught TypeError: Object #<HTMLDivElement> has no method 'attr'
- Uncaught Error: cannot call methods on dialog prior to initialization; attempted to call method 'clo