Fix getDeepElementPosition() couldn't get an element position
Some checks failed
CodeQL / Analyze (javascript) (push) Has been cancelled

This commit is contained in:
Namhyeon Go 2025-05-21 20:41:58 +09:00 committed by GitHub
parent a81ccc0efa
commit 8eb450c9d9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -760,7 +760,7 @@ var ChromeObject = function() {
};
this.getDeepElementPosition = function(selectors) {
var result = this.getEvaluatedValue('(function() { var rect = __getDocument().' + this.getShadowRootSelector(selectors) + '.getBoundingClientRect(); return [parseInt(rect.left), parseInt(rect.top), parseInt(__getWindow().pageXOffset + rect.left), parseInt(__getWindow().pageYOffset + rect.top), parseInt(rect.width), parseInt(rect.height)].join(","); })();');
var result = this.getEvaluatedValue('(function() { var rect = __getDocument()' + this.getShadowRootSelector(selectors) + '.getBoundingClientRect(); return [parseInt(rect.left), parseInt(rect.top), parseInt(__getWindow().pageXOffset + rect.left), parseInt(__getWindow().pageYOffset + rect.top), parseInt(rect.width), parseInt(rect.height)].join(","); })();');
var pos = result.split(',');
if (pos.length == 6) {