Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 84b648d

Browse filesBrowse files
committed
push changes
1 parent 1910c42 commit 84b648d
Copy full SHA for 84b648d

File tree

4 files changed

+13
-2
lines changed
Filter options

4 files changed

+13
-2
lines changed

‎packages/core/ui/core/dom/src/nodes/document-fragment/DocumentFragment.ts

Copy file name to clipboardExpand all lines: packages/core/ui/core/dom/src/nodes/document-fragment/DocumentFragment.ts
+6Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ export default class DocumentFragment extends ParentNode {
88
public nodeName: string = '#document-fragment';
99
public localName: string = '#document-fragment';
1010
isParentNode = true;
11+
// Set this to true if you want the
12+
// children of this fragment to render.
13+
// By default native counerparts of the
14+
// elements inside a DocumentFragement are
15+
// not created.
16+
canRender = false;
1117
constructor() {
1218
super();
1319
this._rootNode = this;

‎packages/core/ui/core/dom/src/nodes/element/Element.ts

Copy file name to clipboardExpand all lines: packages/core/ui/core/dom/src/nodes/element/Element.ts
+4-1Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,8 +391,11 @@ export default class Element extends ParentNode {
391391
const updateAttributeNS = (self: Element, namespace: string, name: string, value: any) => {
392392
let attr = findWhere(self.attributes, createAttributeFilter(namespace, name), false, false);
393393
if (!attr) self.attributes.push((attr = { namespaceURI: namespace, name } as IAttr));
394-
395394
if (attr.value === value) return;
395+
attr.value = value;
396+
if (self.canRender && self['isNativeElement']) {
397+
self[name] = value;
398+
}
396399

397400
if (self.attributeChangedCallback && (<typeof Element>self.constructor)._observedAttributes && (<typeof Element>self.constructor)._observedAttributes.includes(name)) {
398401
self.attributeChangedCallback(name, attr.value, value);

‎packages/core/ui/core/dom/src/nodes/node/Node.ts

Copy file name to clipboardExpand all lines: packages/core/ui/core/dom/src/nodes/node/Node.ts
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,7 @@ export default class Node extends Observable {
211211
else this.firstChild = newNode;
212212
}
213213
assignParentNode(newNode);
214+
newNode['canRender'] = this.canRender;
214215
if (newNode.connectedCallback) newNode.connectedCallback();
215216
return newNode;
216217
}
@@ -250,6 +251,7 @@ export default class Node extends Observable {
250251
node._rootNode = null;
251252
if (node.disconnectedCallback) node.disconnectedCallback();
252253
assignParentNode(node);
254+
node.canRender = true;
253255
return node;
254256
}
255257

‎packages/core/ui/core/dom/src/xml-parser/XMLParser.ts

Copy file name to clipboardExpand all lines: packages/core/ui/core/dom/src/xml-parser/XMLParser.ts
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,6 @@ export default class XMLParser {
236236
if (namespaceURI === NamespaceURI.svg) {
237237
return name;
238238
}
239-
return name.toLowerCase();
239+
return name;
240240
}
241241
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.