Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Commit84b648d

Browse files
committed
push changes
1 parent1910c42 commit84b648d

File tree

4 files changed

+13
-2
lines changed

4 files changed

+13
-2
lines changed

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ export default class DocumentFragment extends ParentNode {
88
publicnodeName:string='#document-fragment';
99
publiclocalName: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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,8 +391,11 @@ export default class Element extends ParentNode {
391391
constupdateAttributeNS=(self:Element,namespace:string,name:string,value:any)=>{
392392
letattr=findWhere(self.attributes,createAttributeFilter(namespace,name),false,false);
393393
if(!attr)self.attributes.push((attr={namespaceURI:namespace, name}asIAttr));
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&&(<typeofElement>self.constructor)._observedAttributes&&(<typeofElement>self.constructor)._observedAttributes.includes(name)){
398401
self.attributeChangedCallback(name,attr.value,value);

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,7 @@ export default class Node extends Observable {
211211
elsethis.firstChild=newNode;
212212
}
213213
assignParentNode(newNode);
214+
newNode['canRender']=this.canRender;
214215
if(newNode.connectedCallback)newNode.connectedCallback();
215216
returnnewNode;
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
returnnode;
254256
}
255257

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

Lines 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
returnname;
238238
}
239-
returnname.toLowerCase();
239+
returnname;
240240
}
241241
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp