return true;\r
},\r
\r
- // Checks if an element, or any of its attributes, is removable by the\r
- // current style definition.\r
- checkElementRemovable : function( element, fullMatch )\r
+ // Check if the element matches the current style definition.\r
+ checkElementMatch : function( element, fullMatch )\r
{\r
var def = this._.definition;\r
\r
return true;\r
}\r
\r
- // Check if the element can be somehow overriden.\r
+ return false;\r
+ },\r
+\r
+ // Checks if an element, or any of its attributes, is removable by the\r
+ // current style definition.\r
+ checkElementRemovable : function( element, fullMatch )\r
+ {\r
+ // Check element matches the style itself.\r
+ if ( this.checkElementMatch( element, fullMatch ) )\r
+ return true;\r
+\r
+ // Check if the element matches the style overrides.\r
var override = getOverrides( this )[ element.getName() ] ;\r
if ( override )\r
{\r
+ var attribs, attName;\r
+\r
// If no attributes have been defined, remove the element.\r
if ( !( attribs = override.attributes ) )\r
return true;\r