@lvce-editor/renderer-process 15.0.0 → 15.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/rendererProcessMain.js +11 -0
- package/package.json +1 -1
|
@@ -3645,6 +3645,13 @@ const toHaveAttribute$1 = (element, {
|
|
|
3645
3645
|
const attribute = element.getAttribute(key);
|
|
3646
3646
|
return attribute === value;
|
|
3647
3647
|
};
|
|
3648
|
+
const toHaveJSProperty = (element, {
|
|
3649
|
+
key,
|
|
3650
|
+
value
|
|
3651
|
+
}) => {
|
|
3652
|
+
const attribute = element[key];
|
|
3653
|
+
return attribute === value;
|
|
3654
|
+
};
|
|
3648
3655
|
const toBeFocused$1 = element => {
|
|
3649
3656
|
return element === document.activeElement;
|
|
3650
3657
|
};
|
|
@@ -3679,6 +3686,7 @@ const SingleElementConditions = {
|
|
|
3679
3686
|
toHaveClass: toHaveClass$1,
|
|
3680
3687
|
toHaveCss: toHaveCss$1,
|
|
3681
3688
|
toHaveId: toHaveId$1,
|
|
3689
|
+
toHaveJSProperty,
|
|
3682
3690
|
toHaveText: toHaveText$1,
|
|
3683
3691
|
toHaveValue
|
|
3684
3692
|
};
|
|
@@ -9386,6 +9394,9 @@ const setProperty = (id, selector, property, value) => {
|
|
|
9386
9394
|
}
|
|
9387
9395
|
const $Viewlet = instance.state.$Viewlet;
|
|
9388
9396
|
const $Element = $Viewlet.querySelector(selector);
|
|
9397
|
+
if (!$Element) {
|
|
9398
|
+
return;
|
|
9399
|
+
}
|
|
9389
9400
|
$Element[property] = value;
|
|
9390
9401
|
};
|
|
9391
9402
|
|