DomConverter (engine/view)
@ckeditor/ckeditor5-engine/src/view/domconverter
DomConverter is a set of tools to do transformations between DOM nodes and view nodes. It also handles
bindings between these nodes.
An instance of the DOM converter is available under
editor.editing.view.domConverter.
The DOM converter does not check which nodes should be rendered (use Renderer), does not keep the
state of a tree nor keeps the synchronization between the tree view and the DOM tree (use Document).
The DOM converter keeps DOM elements to view element bindings, so when the converter gets destroyed, the bindings are lost. Two converters will keep separate binding maps, so one tree view can be bound with two DOM trees.
Filtering
Properties
-
Elements which are considered block elements (and hence should be filled with a block filler).
Whether an element is considered a block element also affects handling of trailing whitespaces.
You can extend this array if you introduce support for block elements which are not yet recognized here.
-
blockFillerMode : BlockFillerModemodule:engine/view/domconverter~DomConverter#blockFillerModeThe mode of a block filler used by the DOM converter.
-
The DOM Document used by
DomConverterto create DOM nodes. -
readonly
inlineObjectElements : Array<string>module:engine/view/domconverter~DomConverter#inlineObjectElementsA list of elements that exist inline (in text) but their inner structure cannot be edited because of the way they are rendered by the browser. They are mostly HTML form elements but there are other elements such as
<img>or<iframe>that also have non-editable children or no children whatsoever.Whether an element is considered an inline object has an impact on white space rendering (trimming) around (and inside of it). In short, white spaces in text nodes next to inline objects are not trimmed.
You can extend this array if you introduce support for inline object elements which are not yet recognized here.
-
Elements which are considered pre-formatted elements.
-
readonly
renderingMode : 'data' | 'editing'module:engine/view/domconverter~DomConverter#renderingModeWhether to leave the View-to-DOM conversion result unchanged or improve editing experience by filtering out interactive data.
-
A list of elements which may affect the editing experience. To avoid this, those elements are replaced with
<span data-ck-unsafe-element="[element name]"></span>while rendering in the editing mode. -
The DOM Document used by
DomConverterto create DOM nodes. -
private readonly
_domToViewMapping : WeakMap<HTMLElement | DocumentFragment, Element | DocumentFragment>module:engine/view/domconverter~DomConverter#_domToViewMappingThe DOM-to-view mapping.
-
private readonly
_elementsWithTemporaryCustomProperties : Set<Element | DocumentFragment>module:engine/view/domconverter~DomConverter#_elementsWithTemporaryCustomPropertiesSet of elements with temporary custom properties that require clearing after render.
-
private readonly
_fakeSelectionMapping : WeakMap<HTMLElement, Selection>module:engine/view/domconverter~DomConverter#_fakeSelectionMappingHolds the mapping between fake selection containers and corresponding view selections.
-
private readonly
_inlineObjectElementMatcher : Matchermodule:engine/view/domconverter~DomConverter#_inlineObjectElementMatcherMatcher for inline object view elements. This is an extension of a simple
inlineObjectElementsarray of element names. -
private readonly
_rawContentElementMatcher : Matchermodule:engine/view/domconverter~DomConverter#_rawContentElementMatcherMatcher for view elements whose content should be treated as raw data and not processed during the conversion from DOM nodes to view elements.
-
private readonly
_viewToDomMapping : WeakMap<Element | DocumentFragment, HTMLElement | DocumentFragment>module:engine/view/domconverter~DomConverter#_viewToDomMappingThe view-to-DOM mapping.
Methods
-
constructor( document, options = { [options.blockFillerMode], [options.renderingMode] } )module:engine/view/domconverter~DomConverter#constructorCreates a DOM converter.
Parameters
document : DocumentThe view document instance.
options : objectAn object with configuration options.
Properties[ options.blockFillerMode ] : BlockFillerModeThe type of the block filler to use. Default value depends on the options.renderingMode: 'nbsp' when options.renderingMode == 'data', 'br' when options.renderingMode == 'editing'.
[ options.renderingMode ] : 'data' | 'editing'Whether to leave the View-to-DOM conversion result unchanged or improve editing experience by filtering out interactive data.
Defaults to
'editing'
Defaults to
{}
-
bindDocumentFragments( domFragment, viewFragment ) → voidmodule:engine/view/domconverter~DomConverter#bindDocumentFragmentsBinds DOM and view document fragments, so it will be possible to get corresponding document fragments using
mapDomToViewandmapViewToDom.Parameters
domFragment : DocumentFragmentThe DOM document fragment to bind.
viewFragment : DocumentFragmentThe view document fragment to bind.
Returns
void
-
bindElements( domElement, viewElement ) → voidmodule:engine/view/domconverter~DomConverter#bindElementsBinds DOM and view elements, so it will be possible to get corresponding elements using
mapDomToViewandmapViewToDom.Parameters
domElement : HTMLElementThe DOM element to bind.
viewElement : ElementThe view element to bind.
Returns
void
-
bindFakeSelection( domElement, viewDocumentSelection ) → voidmodule:engine/view/domconverter~DomConverter#bindFakeSelectionBinds a given DOM element that represents fake selection to a position of a document selection. Document selection copy is stored and can be retrieved by the
fakeSelectionToViewmethod.Parameters
domElement : HTMLElementviewDocumentSelection : DocumentSelection
Returns
void
-
domChildrenToView( domElement, options = { [options.bind], [options.keepOriginalCase], [options.skipComments], [options.withChildren] }, inlineNodes ) → IterableIterator<Node>module:engine/view/domconverter~DomConverter#domChildrenToViewConverts children of the DOM element to view nodes using the
domToViewmethod. Additionally this method omits block filler, if it exists in the DOM parent.Parameters
domElement : HTMLElementParent DOM element.
options : undefined | objectSee
domToViewoptions parameter.Properties[ options.bind ] : boolean[ options.keepOriginalCase ] : boolean[ options.skipComments ] : boolean[ options.withChildren ] : boolean
Defaults to
{}inlineNodes : Array<Node>An array that will be populated with inline nodes. It's used internally for whitespace processing.
Defaults to
[]
Returns
IterableIterator<Node>View nodes.
-
domPositionToView( domParent, domOffset ) → null | Positionmodule:engine/view/domconverter~DomConverter#domPositionToViewConverts DOM parent and offset to view
Position.If the position is inside a filler which has no corresponding view node, position of the filler will be converted and returned.
If the position is inside DOM element rendered by
UIElementthat position will be converted to view position before that UIElement.If structures are too different and it is not possible to find corresponding position then
nullwill be returned.Parameters
domParent : NodeDOM position parent.
domOffset : numberDOM position offset. You can skip it when converting the inline filler node.
Defaults to
0
Returns
null | PositionView position.
-
domRangeToView( domRange ) → null | Rangemodule:engine/view/domconverter~DomConverter#domRangeToView -
domSelectionToView( domSelection ) → Selectionmodule:engine/view/domconverter~DomConverter#domSelectionToView -
domToView( domNode, options = { [options.bind], [options.keepOriginalCase], [options.skipComments], [options.withChildren] } ) → null | Node | DocumentFragmentmodule:engine/view/domconverter~DomConverter#domToViewConverts DOM to view. For all text nodes, not bound elements and document fragments new items will be created. For bound elements and document fragments function will return corresponding items. For fillers
nullwill be returned. For all DOM elements rendered byUIElementthat UIElement will be returned.Parameters
domNode : NodeDOM node or document fragment to transform.
options : objectConversion options.
Properties[ options.bind ] : booleanDetermines whether new elements will be bound. False by default.
[ options.keepOriginalCase ] : booleanIf
false, node's tag name will be converted to lower case. False by default.[ options.skipComments ] : booleanIf
false, comment nodes will be converted to$commentview UI elements. False by default.[ options.withChildren ] : booleanIf
true, node's and document fragment's children will be converted too. True by default.
Defaults to
{}
Returns
null | Node | DocumentFragmentConverted node or document fragment or
nullif DOM node is a filler or the given node is an empty text node.
-
fakeSelectionToView( domElement ) → undefined | Selectionmodule:engine/view/domconverter~DomConverter#fakeSelectionToViewReturns a view selection instance corresponding to a given DOM element that represents fake selection. Returns
undefinedif binding to the given DOM element does not exist.Parameters
domElement : HTMLElement
Returns
undefined | Selection
-
findCorrespondingDomText( viewText ) → null | Textmodule:engine/view/domconverter~DomConverter#findCorrespondingDomTextFinds corresponding text node. Text nodes are not bound, corresponding text node is returned based on the sibling or parent.
If the directly previous sibling is a bound element, it is used to find the corresponding text node.
If this is a first child in the parent and the parent is a bound element, it is used to find the corresponding text node.
Otherwise
nullis returned.Parameters
viewText : TextView text node.
Returns
null | TextCorresponding DOM text node or
null, if it was not possible to find a corresponding node.
-
findCorrespondingViewText( domText ) → null | Text | RawElement | UIElementmodule:engine/view/domconverter~DomConverter#findCorrespondingViewTextFinds corresponding text node. Text nodes are not bound, corresponding text node is returned based on the sibling or parent.
If the directly previous sibling is a bound element, it is used to find the corresponding text node.
If this is a first child in the parent and the parent is a bound element, it is used to find the corresponding text node.
For all text nodes rendered by a
UIElementor aRawElement, the parentUIElementorRawElementwill be returned.Otherwise
nullis returned.Note that for the block or inline filler this method returns
null.Parameters
domText : TextDOM text node.
Returns
null | Text | RawElement | UIElementCorresponding view text node or
null, if it was not possible to find a corresponding node.
-
focus( viewEditable ) → voidmodule:engine/view/domconverter~DomConverter#focusFocuses DOM editable that is corresponding to provided
EditableElement.Parameters
viewEditable : EditableElement
Returns
void
-
getHostViewElement( domNode ) → null | RawElement | UIElementmodule:engine/view/domconverter~DomConverter#getHostViewElementReturns a parent
UIElementorRawElementthat hosts the provided DOM node. Returnsnullif there is no such parent.Parameters
domNode : Node
Returns
null | RawElement | UIElement
-
isBlockFiller( domNode ) → booleanmodule:engine/view/domconverter~DomConverter#isBlockFillerChecks if the node is an instance of the block filler for this DOM converter.
const converter = new DomConverter( viewDocument, { blockFillerMode: 'br' } ); converter.isBlockFiller( BR_FILLER( document ) ); // true converter.isBlockFiller( NBSP_FILLER( document ) ); // falseNote:: For the
'nbsp'mode the method also checks context of a node so it cannot be a detached node.Note: A special case in the
'nbsp'mode exists where the<br>in<p><br></p>is treated as a block filler.Parameters
domNode : NodeDOM node to check.
Returns
booleanTrue if a node is considered a block filler for given mode.
-
isDocumentFragment( node ) → node is DocumentFragmentmodule:engine/view/domconverter~DomConverter#isDocumentFragmentReturns
truewhennode.nodeTypeequalsNode.DOCUMENT_FRAGMENT_NODE.Parameters
node : NodeNode to check.
Returns
node is DocumentFragment
-
isDomSelectionBackward( selection ) → booleanmodule:engine/view/domconverter~DomConverter#isDomSelectionBackwardReturns
trueif given selection is a backward selection, that is, if it'sfocusis beforeanchor.Parameters
selection : SelectionSelection instance to check.
Returns
boolean
-
isDomSelectionCorrect( domSelection ) → booleanmodule:engine/view/domconverter~DomConverter#isDomSelectionCorrectChecks if the given selection's boundaries are at correct places.
The following places are considered as incorrect for selection boundaries:
- before or in the middle of an inline filler sequence,
- inside a DOM element which represents a view UI element,
- inside a DOM element which represents a view raw element.
Parameters
domSelection : SelectionThe DOM selection object to be checked.
Returns
booleantrueif the given selection is at a correct place,falseotherwise.
-
isElement( node ) → node is HTMLElementmodule:engine/view/domconverter~DomConverter#isElementReturns
truewhennode.nodeTypeequalsNode.ELEMENT_NODE.Parameters
node : NodeNode to check.
Returns
node is HTMLElement
-
mapDomToView( domElementOrDocumentFragment ) → undefined | Element | DocumentFragmentmodule:engine/view/domconverter~DomConverter#mapDomToViewReturns corresponding view Element or
DocumentFragmentfor provided DOM element or document fragment. If there is no view item bound to the given DOM -undefinedis returned.For all DOM elements rendered by a
UIElementor aRawElement, the parentUIElementorRawElementwill be returned.Parameters
domElementOrDocumentFragment : HTMLElement | DocumentFragmentDOM element or document fragment.
Returns
undefined | Element | DocumentFragmentCorresponding view element, document fragment or
undefinedif no element was bound.
-
mapViewToDom( documentFragment ) → undefined | DocumentFragmentmodule:engine/view/domconverter~DomConverter#mapViewToDom:DOCUMENT_FRAGMENTReturns corresponding DOM item for provided Element or DocumentFragment. To find a corresponding text for view Text instance use
findCorrespondingDomText.Parameters
documentFragment : DocumentFragmentView element or document fragment.
Returns
undefined | DocumentFragmentCorresponding DOM node or document fragment.
-
mapViewToDom( documentFragmentOrElement ) → undefined | HTMLElement | DocumentFragmentmodule:engine/view/domconverter~DomConverter#mapViewToDom:DOCUMENT_FRAGMENT_OR_ELEMENTReturns corresponding DOM item for provided Element or DocumentFragment. To find a corresponding text for view Text instance use
findCorrespondingDomText.Parameters
documentFragmentOrElement : Element | DocumentFragmentView element or document fragment.
Returns
undefined | HTMLElement | DocumentFragmentCorresponding DOM node or document fragment.
-
mapViewToDom( element ) → undefined | HTMLElementmodule:engine/view/domconverter~DomConverter#mapViewToDom:ELEMENTReturns corresponding DOM item for provided Element or DocumentFragment. To find a corresponding text for view Text instance use
findCorrespondingDomText.Parameters
element : ElementView element or document fragment.
Returns
undefined | HTMLElementCorresponding DOM node or document fragment.
-
registerInlineObjectMatcher( pattern ) → voidmodule:engine/view/domconverter~DomConverter#registerInlineObjectMatcherRegisters a
MatcherPatternfor inline object view elements.This is affecting how
domToViewanddomChildrenToViewprocess DOM nodes.This is an extension of a simple
inlineObjectElementsarray of element names.Parameters
pattern : MatcherPatternPattern matching a view element which should be treated as an inline object.
Returns
void
-
registerRawContentMatcher( pattern ) → voidmodule:engine/view/domconverter~DomConverter#registerRawContentMatcherRegisters a
MatcherPatternfor view elements whose content should be treated as raw data and not processed during the conversion from DOM nodes to view elements.This is affecting how
domToViewanddomChildrenToViewprocess DOM nodes.The raw data can be later accessed by a custom property of a view element called
"$rawContent".Parameters
pattern : MatcherPatternPattern matching a view element whose content should be treated as raw data.
Returns
void
-
removeDomElementAttribute( domElement, key ) → voidmodule:engine/view/domconverter~DomConverter#removeDomElementAttributeRemoves an attribute from a DOM element.
Note: To set the attribute, use
setDomElementAttribute.Parameters
domElement : HTMLElementThe DOM element the attribute should be removed from.
key : stringThe name of the attribute.
Returns
void
-
setContentOf( domElement, html ) → voidmodule:engine/view/domconverter~DomConverter#setContentOfSet
domElement's content using providedhtmlargument. Apply necessary filtering for the editing pipeline.Parameters
domElement : HTMLElementDOM element that should have
htmlset as its content.html : stringTextual representation of the HTML that will be set on
domElement.
Returns
void
-
setDomElementAttribute( domElement, key, value, [ relatedViewElement ] ) → voidmodule:engine/view/domconverter~DomConverter#setDomElementAttributeSets the attribute on a DOM element.
Note: To remove the attribute, use
removeDomElementAttribute.Parameters
domElement : HTMLElementThe DOM element the attribute should be set on.
key : stringThe name of the attribute.
value : stringThe value of the attribute.
[ relatedViewElement ] : ElementThe view element related to the
domElement(if there is any). It helps decide whether the attribute set is unsafe. For instance, view elements created via theDowncastWritermethods can allow certain attributes that would normally be filtered out.
Returns
void
-
shouldRenderAttribute( attributeKey, attributeValue, elementName ) → booleanmodule:engine/view/domconverter~DomConverter#shouldRenderAttributeDecides whether a given pair of attribute key and value should be passed further down the pipeline.
Parameters
attributeKey : stringattributeValue : stringelementName : stringElement name in lower case.
Returns
boolean
-
unbindDomElement( domElement ) → voidmodule:engine/view/domconverter~DomConverter#unbindDomElementUnbinds a given DOM element from the view element it was bound to. Unbinding is deep, meaning that all children of the DOM element will be unbound too.
Parameters
domElement : HTMLElementThe DOM element to unbind.
Returns
void
-
viewChildrenToDom( viewElement, options = { [options.bind], [options.withChildren] } ) → IterableIterator<Node>module:engine/view/domconverter~DomConverter#viewChildrenToDomConverts children of the view element to DOM using the
viewToDommethod. Additionally, this method adds block filler to the list of children, if needed.Parameters
viewElement : Element | DocumentFragmentParent view element.
options : objectSee
viewToDomoptions parameter.Properties[ options.bind ] : boolean[ options.withChildren ] : boolean
Defaults to
{}
Returns
IterableIterator<Node>DOM nodes.
-
viewPositionToDom( viewPosition ) → null | objectmodule:engine/view/domconverter~DomConverter#viewPositionToDomConverts view
Positionto DOM parent and offset.Inline and block fillers are handled during the conversion. If the converted position is directly before inline filler it is moved inside the filler.
Parameters
viewPosition : PositionView position.
Returns
null | objectDOM position or
nullif view position could not be converted to DOM. DOM position has two properties:parent- DOM position parent.offset- DOM position offset.
-
viewRangeToDom( viewRange ) → Rangemodule:engine/view/domconverter~DomConverter#viewRangeToDom -
viewToDom( viewNode, [ options ] = { [options.bind], [options.withChildren] } ) → HTMLElementmodule:engine/view/domconverter~DomConverter#viewToDomParameters
viewNode : Element[ options ] : object-
Properties
[ options.bind ] : boolean[ options.withChildren ] : boolean
Returns
HTMLElement
-
viewToDom( viewNode, [ options ] = { [options.bind], [options.withChildren] } ) → DocumentFragmentmodule:engine/view/domconverter~DomConverter#viewToDomParameters
viewNode : DocumentFragment[ options ] : object-
Properties
[ options.bind ] : boolean[ options.withChildren ] : boolean
Returns
DocumentFragment
-
viewToDom( viewNode, [ options ] = { [options.bind], [options.withChildren] } ) → Nodemodule:engine/view/domconverter~DomConverter#viewToDomParameters
viewNode : Node[ options ] : object-
Properties
[ options.bind ] : boolean[ options.withChildren ] : boolean
Returns
Node
-
viewToDom( viewNode, [ options ] = { [options.bind], [options.withChildren] } ) → Textmodule:engine/view/domconverter~DomConverter#viewToDomParameters
viewNode : Text[ options ] : object-
Properties
[ options.bind ] : boolean[ options.withChildren ] : boolean
Returns
Text
-
Remove DOM selection from blurred editable, so it won't interfere with clicking on dropdowns (especially on iOS).
Returns
void
-
internal
_clearTemporaryCustomProperties() → voidmodule:engine/view/domconverter~DomConverter#_clearTemporaryCustomProperties -
private
_createReplacementDomElement( elementName, [ originalDomElement ] ) → HTMLElementmodule:engine/view/domconverter~DomConverter#_createReplacementDomElementReturn a element with a special attribute holding the name of the original element. Optionally, copy all the attributes of the original element if that element is provided.
Parameters
elementName : stringThe name of view element.
[ originalDomElement ] : HTMLElementThe original DOM element to copy attributes and content from.
Returns
HTMLElement
-
private
_createViewElement( node, options = { [options.keepOriginalCase] } ) → Elementmodule:engine/view/domconverter~DomConverter#_createViewElementCreates view element basing on the node type.
Parameters
node : NodeDOM node to check.
options : objectConversion options. See
domToViewoptions parameter.Properties[ options.keepOriginalCase ] : boolean
Returns
-
private
_domToView( domNode, options = { [options.bind], [options.keepOriginalCase], [options.skipComments], [options.withChildren] }, inlineNodes ) → IterableIterator<null | Node | DocumentFragment>module:engine/view/domconverter~DomConverter#_domToViewInternal generator for
domToView. Also used bydomChildrenToView. Separates DOM nodes conversion from whitespaces processing.Parameters
domNode : NodeDOM node or document fragment to transform.
options : object-
Properties
[ options.bind ] : boolean[ options.keepOriginalCase ] : boolean[ options.skipComments ] : boolean[ options.withChildren ] : boolean
inlineNodes : Array<Node>An array of recently encountered inline nodes truncated to the block element boundaries. Used later to process whitespaces.
Returns
IterableIterator<null | Node | DocumentFragment>
-
-
private
_getTouchingInlineViewNode( node, getNext ) → null | Element | TextProxymodule:engine/view/domconverter~DomConverter#_getTouchingInlineViewNodeHelper function. For given view text node, it finds previous or next sibling that is contained in the same container element. If there is no such sibling,
nullis returned.Parameters
node : TextReference node.
getNext : boolean
Returns
-
private
_isBlockDomElement( node ) → booleanmodule:engine/view/domconverter~DomConverter#_isBlockDomElementReturns
trueif a DOM node belongs toblockElements.falseotherwise.Parameters
node : Node
Returns
boolean
-
private
_isBlockViewElement( node ) → booleanmodule:engine/view/domconverter~DomConverter#_isBlockViewElementReturns
trueif a view node belongs toblockElements.falseotherwise.Parameters
node : Node
Returns
boolean
-
private
_isDomSelectionPositionCorrect( domParent, offset ) → booleanmodule:engine/view/domconverter~DomConverter#_isDomSelectionPositionCorrectChecks if the given DOM position is a correct place for selection boundary. See
isDomSelectionCorrect.Parameters
domParent : NodePosition parent.
offset : numberPosition offset.
Returns
booleantrueif given position is at a correct place for selection boundary,falseotherwise.
-
private
_isInlineObjectElement( node ) → node is Elementmodule:engine/view/domconverter~DomConverter#_isInlineObjectElementReturns
trueif a DOM node belongs toinlineObjectElements.falseotherwise.Parameters
node : Node | DocumentFragment | TextProxy
Returns
node is Element
-
private
_isPreFormatted( node ) → booleanmodule:engine/view/domconverter~DomConverter#_isPreFormattedChecks whether given text contains preformatted white space. This is the case if
- any of node ancestors has a name which is in
preElementsarray, or - the closest ancestor that has the
white-spaceCSS property sets it to a value that preserves spaces
Parameters
Returns
booleantrueif given node contains preformatted white space,falseotherwise.
- any of node ancestors has a name which is in
-
private
_isViewElementWithRawContent( viewElement, options = { [options.withChildren] } ) → booleanmodule:engine/view/domconverter~DomConverter#_isViewElementWithRawContentChecks if view element's content should be treated as a raw data.
Parameters
viewElement : Element | DocumentFragmentView element to check.
options : objectConversion options. See
domToViewoptions parameter.Properties[ options.withChildren ] : boolean
Returns
boolean
-
private
_nodeEndsWithSpace( node ) → booleanmodule:engine/view/domconverter~DomConverter#_nodeEndsWithSpaceChecks whether given node ends with a space character after changing appropriate space characters to
s.Parameters
node : TextProxyNode to check.
Returns
booleantrueif givennodeends with space,falseotherwise.
-
private
_processDataFromViewText( node ) → stringmodule:engine/view/domconverter~DomConverter#_processDataFromViewTextTakes text data from a given
dataand processes it so it is correctly displayed in the DOM.Following changes are done:
- a space at the beginning is changed to
if this is the first text node in its container element or if a previous text node ends with a space character, - space at the end of the text node is changed to
if there are two spaces at the end of a node or if next node starts with a space or if it is the last text node in its container, - remaining spaces are replaced to a chain of spaces and
(e.g.'x x'becomes'x x').
Content of
preElementsis not processed.Parameters
Returns
stringProcessed text data.
- a space at the beginning is changed to
-
private
_processDomInlineNodes( domParent, inlineNodes, options = { [options.withChildren] } ) → voidmodule:engine/view/domconverter~DomConverter#_processDomInlineNodesInternal helper that walks the list of inline view nodes already generated from DOM nodes and handles whitespaces and NBSPs.
Parameters
domParent : null | HTMLElementThe DOM parent of the given inline nodes. This should be a document fragment or a block element to whitespace processing start cleaning.
inlineNodes : Array<Node>An array of recently encountered inline nodes truncated to the block element boundaries.
options : object-
Properties
[ options.withChildren ] : boolean
Returns
void
-
private
_shouldRenameElement( elementName ) → booleanmodule:engine/view/domconverter~DomConverter#_shouldRenameElementChecks whether a given element name should be renamed in a current rendering mode.
Parameters
elementName : stringThe name of view element.
Returns
boolean
Every day, we work hard to keep our documentation complete. Have you spotted outdated information? Is something missing? Please report it via our issue tracker.
With the release of version 42.0.0, we have rewritten much of our documentation to reflect the new import paths and features. We appreciate your feedback to help us ensure its accuracy and completeness.