Skip to content

Commit a25fd1e

Browse files
authored
Merge pull request mcolella14#7 from mcolella14/use-page-eval
Use page eval
2 parents 216d0fb + e591fdc commit a25fd1e

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

pyppeteer_ghost_cursor/spoof.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -257,9 +257,9 @@ async def move(
257257
{"objectId": elem._remoteObject["objectId"]},
258258
)
259259
except:
260-
await elem.evaluate(
261-
"e => e.scrollIntoView()"
262-
) # use regular JS scroll method as a fallback
260+
await self.page.evaluate(
261+
"e => e.scrollIntoView()", elem
262+
) # use regular JS scroll method as a fallback (use Page.evaluate for backwards compatibility)
263263
box = await getElementBox(self.page, elem)
264264
if box is None:
265265
raise Exception(

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
README = (HERE / "README.md").read_text()
99
setuptools.setup(
1010
name="pyppeteer_ghost_cursor",
11-
version="0.2.0",
11+
version="0.2.1",
1212
description="Pyppeteer implementation of Xetera/ghost-cursor",
1313
long_description=README,
1414
long_description_content_type="text/markdown",

0 commit comments

Comments
 (0)