|
@@ -81,10 +81,18 @@ export default class RootElement extends Element {
|
|
|
*/
|
|
*/
|
|
|
is( type, name ) {
|
|
is( type, name ) {
|
|
|
if ( !name ) {
|
|
if ( !name ) {
|
|
|
- return type == 'rootElement' || type == 'element' || type == this.name || type == 'node';
|
|
|
|
|
- } else {
|
|
|
|
|
- return ( type == 'rootElement' && name == this.name ) || ( type === 'element' && name == this.name );
|
|
|
|
|
|
|
+ return type === 'rootElement' || type === 'model:rootElement' ||
|
|
|
|
|
+ // From super.is(). This is highly utilised method and cannot call super. See ckeditor/ckeditor5#6529.
|
|
|
|
|
+ type === 'element' || type === 'model:element' ||
|
|
|
|
|
+ type === this.name || type === 'model:' + this.name ||
|
|
|
|
|
+ type === 'node' || type === 'model:node';
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ return name === this.name && (
|
|
|
|
|
+ type === 'rootElement' || type === 'model:rootElement' ||
|
|
|
|
|
+ // From super.is(). This is highly utilised method and cannot call super. See ckeditor/ckeditor5#6529.
|
|
|
|
|
+ type === 'element' || type === 'model:element'
|
|
|
|
|
+ );
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -104,3 +112,4 @@ export default class RootElement extends Element {
|
|
|
// @if CK_DEBUG_ENGINE // console.log( 'ModelRootElement: ' + this );
|
|
// @if CK_DEBUG_ENGINE // console.log( 'ModelRootElement: ' + this );
|
|
|
// @if CK_DEBUG_ENGINE // }
|
|
// @if CK_DEBUG_ENGINE // }
|
|
|
}
|
|
}
|
|
|
|
|
+
|