feat: add shadow bool field to text step
This commit is contained in:
@@ -13,6 +13,7 @@ import { useTranslation } from 'react-i18next';
|
|||||||
interface ElementInfo {
|
interface ElementInfo {
|
||||||
tagName: string;
|
tagName: string;
|
||||||
hasOnlyText?: boolean;
|
hasOnlyText?: boolean;
|
||||||
|
isShadowRoot?: boolean;
|
||||||
innerText?: string;
|
innerText?: string;
|
||||||
url?: string;
|
url?: string;
|
||||||
imageUrl?: string;
|
imageUrl?: string;
|
||||||
@@ -185,6 +186,7 @@ export const BrowserWindow = () => {
|
|||||||
addTextStep('', data, {
|
addTextStep('', data, {
|
||||||
selector: highlighterData.selector,
|
selector: highlighterData.selector,
|
||||||
tag: highlighterData.elementInfo?.tagName,
|
tag: highlighterData.elementInfo?.tagName,
|
||||||
|
shadow: highlighterData.elementInfo?.isShadowRoot,
|
||||||
attribute
|
attribute
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
@@ -192,7 +194,7 @@ export const BrowserWindow = () => {
|
|||||||
setAttributeOptions(options);
|
setAttributeOptions(options);
|
||||||
setSelectedElement({
|
setSelectedElement({
|
||||||
selector: highlighterData.selector,
|
selector: highlighterData.selector,
|
||||||
info: highlighterData.elementInfo
|
info: highlighterData.elementInfo,
|
||||||
});
|
});
|
||||||
setShowAttributeModal(true);
|
setShowAttributeModal(true);
|
||||||
}
|
}
|
||||||
@@ -229,6 +231,7 @@ export const BrowserWindow = () => {
|
|||||||
selectorObj: {
|
selectorObj: {
|
||||||
selector: highlighterData.selector,
|
selector: highlighterData.selector,
|
||||||
tag: highlighterData.elementInfo?.tagName,
|
tag: highlighterData.elementInfo?.tagName,
|
||||||
|
shadow: highlighterData.elementInfo?.isShadowRoot,
|
||||||
attribute
|
attribute
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -276,6 +279,7 @@ export const BrowserWindow = () => {
|
|||||||
addTextStep('', data, {
|
addTextStep('', data, {
|
||||||
selector: selectedElement.selector,
|
selector: selectedElement.selector,
|
||||||
tag: selectedElement.info?.tagName,
|
tag: selectedElement.info?.tagName,
|
||||||
|
shadow: selectedElement.info?.isShadowRoot,
|
||||||
attribute: attribute
|
attribute: attribute
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -288,6 +292,7 @@ export const BrowserWindow = () => {
|
|||||||
selectorObj: {
|
selectorObj: {
|
||||||
selector: selectedElement.selector,
|
selector: selectedElement.selector,
|
||||||
tag: selectedElement.info?.tagName,
|
tag: selectedElement.info?.tagName,
|
||||||
|
shadow: selectedElement.info?.isShadowRoot,
|
||||||
attribute: attribute
|
attribute: attribute
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user