@lwc/engine-core 7.0.4 → 7.1.0
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/dist/framework/renderer.d.ts +2 -0
- package/dist/index.cjs.js +15 -3
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.js +15 -3
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -6691,7 +6691,14 @@ function runConnectedCallback(vm) {
|
|
|
6691
6691
|
const { connectedCallback } = vm.def;
|
|
6692
6692
|
if (!isUndefined$1(connectedCallback)) {
|
|
6693
6693
|
logOperationStart(3 /* OperationId.ConnectedCallback */, vm);
|
|
6694
|
+
if (!process.env.IS_BROWSER) {
|
|
6695
|
+
// Track host element mutations in SSR mode to add the `data-lwc-host-mutated` attribute if necessary
|
|
6696
|
+
vm.renderer.startTrackingMutations(vm.elm);
|
|
6697
|
+
}
|
|
6694
6698
|
invokeComponentCallback(vm, connectedCallback);
|
|
6699
|
+
if (!process.env.IS_BROWSER) {
|
|
6700
|
+
vm.renderer.stopTrackingMutations(vm.elm);
|
|
6701
|
+
}
|
|
6695
6702
|
logOperationEnd(3 /* OperationId.ConnectedCallback */, vm);
|
|
6696
6703
|
}
|
|
6697
6704
|
// This test only makes sense in the browser, with synthetic lifecycle, and when reporting is enabled or
|
|
@@ -7262,7 +7269,12 @@ function textNodeContentsAreEqual(node, vnode, renderer) {
|
|
|
7262
7269
|
// The validationOptOut static property can be an array of attribute names.
|
|
7263
7270
|
// Any attribute names specified in that array will not be validated, and the
|
|
7264
7271
|
// LWC runtime will assume that VDOM attrs and DOM attrs are in sync.
|
|
7265
|
-
function getValidationPredicate(optOutStaticProp) {
|
|
7272
|
+
function getValidationPredicate(elm, renderer, optOutStaticProp) {
|
|
7273
|
+
// `data-lwc-host-mutated` is a special attribute added by the SSR engine itself,
|
|
7274
|
+
// which does the same thing as an explicit `static validationOptOut = true`.
|
|
7275
|
+
if (renderer.getAttribute(elm, 'data-lwc-host-mutated') === '') {
|
|
7276
|
+
return (_attrName) => false;
|
|
7277
|
+
}
|
|
7266
7278
|
if (isUndefined$1(optOutStaticProp)) {
|
|
7267
7279
|
return (_attrName) => true;
|
|
7268
7280
|
}
|
|
@@ -7380,7 +7392,7 @@ function hydrateElement(elm, vnode, renderer) {
|
|
|
7380
7392
|
}
|
|
7381
7393
|
function hydrateCustomElement(elm, vnode, renderer) {
|
|
7382
7394
|
const { validationOptOut } = vnode.ctor;
|
|
7383
|
-
const shouldValidateAttr = getValidationPredicate(validationOptOut);
|
|
7395
|
+
const shouldValidateAttr = getValidationPredicate(elm, renderer, validationOptOut);
|
|
7384
7396
|
// The validationOptOut static property can be an array of attribute names.
|
|
7385
7397
|
// Any attribute names specified in that array will not be validated, and the
|
|
7386
7398
|
// LWC runtime will assume that VDOM attrs and DOM attrs are in sync.
|
|
@@ -8025,5 +8037,5 @@ function readonly(obj) {
|
|
|
8025
8037
|
}
|
|
8026
8038
|
|
|
8027
8039
|
export { LightningElement, profilerControl as __unstable__ProfilerControl, reportingControl as __unstable__ReportingControl, api$1 as api, computeShadowAndRenderMode, connectRootElement, createContextProviderWithRegister, createVM, disconnectRootElement, freezeTemplate, getAssociatedVMIfPresent, getComponentAPIVersion, getComponentConstructor, getComponentDef, getComponentHtmlPrototype, hydrateRoot, isComponentConstructor, parseFragment, parseSVGFragment, readonly, registerComponent, registerDecorators, registerTemplate, runFormAssociatedCallback, runFormDisabledCallback, runFormResetCallback, runFormStateRestoreCallback, sanitizeAttribute, setHooks, shouldBeFormAssociated, swapComponent, swapStyle, swapTemplate, track, unwrap, wire };
|
|
8028
|
-
/** version: 7.0
|
|
8040
|
+
/** version: 7.1.0 */
|
|
8029
8041
|
//# sourceMappingURL=index.js.map
|