Ticket #5022 (closed Task: wontfix)
Suggestion: Move functions "is()" and "getName()" to node.js
|Reported by:||Scott||Owned by:|
During my tinkering with ckeditor, I think it would be very convenient to have the methods "is()" and "getName()" moved from element.js to node.js.
This makes sense because nodeName is a part of the browsers TextNode object as well. It helps because if you are doing a test to see if an element is say a <br /> the code changes from:
if(element && element.type == CKEDITOR.NODE_ELEMENT && element.is('br'))
if(element && element.is && element.is('br'))
if(element && element.is('br'))
I have seen these sort of checks a lot of places in the ckeditor source. Let me know your thoughts.