@angular/platform-server 22.2.0-next.2 → 22.2.0-next.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/_server-chunk.mjs +17 -18
- package/fesm2022/_server-chunk.mjs.map +1 -1
- package/fesm2022/init.mjs +1 -1
- package/fesm2022/platform-server.mjs +2 -2
- package/fesm2022/platform-server.mjs.map +1 -1
- package/fesm2022/testing.mjs +5 -5
- package/fesm2022/testing.mjs.map +1 -1
- package/package.json +5 -5
- package/third_party/domino/bundled-domino.mjs +29 -6
- package/third_party/domino/bundled-domino.mjs.map +1 -1
- package/types/init.d.ts +1 -1
- package/types/platform-server.d.ts +1 -1
- package/types/testing.d.ts +1 -1
|
@@ -850,11 +850,17 @@ function requireNodeUtils () {
|
|
|
850
850
|
|
|
851
851
|
function fallbackRawContentTags(node) {
|
|
852
852
|
const tags = [];
|
|
853
|
-
while (node
|
|
854
|
-
if (node.
|
|
855
|
-
|
|
853
|
+
while (node) {
|
|
854
|
+
if (node.nodeType === 1 /*ELEMENT_NODE*/) {
|
|
855
|
+
if (node.namespaceURI === NAMESPACE.HTML && hasRawContentFallback[node.tagName]) {
|
|
856
|
+
tags.push(node.localName);
|
|
857
|
+
}
|
|
858
|
+
node = node.parentNode;
|
|
859
|
+
} else if (node.nodeType === 11 /*DOCUMENT_FRAGMENT_NODE*/ && node._host) {
|
|
860
|
+
node = node._host;
|
|
861
|
+
} else {
|
|
862
|
+
node = node.parentNode;
|
|
856
863
|
}
|
|
857
|
-
node = node.parentNode;
|
|
858
864
|
}
|
|
859
865
|
return tags;
|
|
860
866
|
}
|
|
@@ -1024,7 +1030,13 @@ function requireNodeUtils () {
|
|
|
1024
1030
|
s += '<!--' + commentData + '-->';
|
|
1025
1031
|
break;
|
|
1026
1032
|
case 7: //PROCESSING_INSTRUCTION_NODE
|
|
1027
|
-
|
|
1033
|
+
let content = escapeProcessingInstructionContent(kid.data);
|
|
1034
|
+
if (content.includes('</')) {
|
|
1035
|
+
const fallbackTags = fallbackRawContentTags(parent);
|
|
1036
|
+
for (const fallbackTag of fallbackTags) {
|
|
1037
|
+
content = escapeMatchingClosingTag(content, fallbackTag);
|
|
1038
|
+
}
|
|
1039
|
+
}
|
|
1028
1040
|
s += '<?' + kid.target + ' ' + content + '?>';
|
|
1029
1041
|
break;
|
|
1030
1042
|
case 10: //DOCUMENT_TYPE_NODE
|
|
@@ -8141,10 +8153,21 @@ function requireHtmlelts () {
|
|
|
8141
8153
|
ctor: function HTMLTemplateElement(doc, localName, prefix) {
|
|
8142
8154
|
HTMLElement.call(this, doc, localName, prefix);
|
|
8143
8155
|
this._contentFragment = doc._templateDoc.createDocumentFragment();
|
|
8156
|
+
this._contentFragment._host = this;
|
|
8144
8157
|
},
|
|
8145
8158
|
props: {
|
|
8146
8159
|
content: { get: function() { return this._contentFragment; } },
|
|
8147
|
-
serialize: { value: function() { return this.content.serialize(); } }
|
|
8160
|
+
serialize: { value: function() { return this.content.serialize(); } },
|
|
8161
|
+
cloneNode: {
|
|
8162
|
+
value: function(deep) {
|
|
8163
|
+
var clone = HTMLElement.prototype.cloneNode.call(this, deep);
|
|
8164
|
+
if (deep) {
|
|
8165
|
+
clone._contentFragment = this._contentFragment.cloneNode(true);
|
|
8166
|
+
clone._contentFragment._host = clone;
|
|
8167
|
+
}
|
|
8168
|
+
return clone;
|
|
8169
|
+
}
|
|
8170
|
+
}
|
|
8148
8171
|
}
|
|
8149
8172
|
});
|
|
8150
8173
|
|