Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
This commit is contained in:
2018-02-28 08:44:24 -05:00
parent f2a9924065
commit dcb828f3a3
+6 -6
View File
@@ -183,13 +183,13 @@ You can also render JavaScript pages without Requests:
# ^^ proceeding from above ^^
>>> script = """
() => {
return {
width: document.documentElement.clientWidth,
height: document.documentElement.clientHeight,
deviceScaleFactor: window.devicePixelRatio,
() => {
return {
width: document.documentElement.clientWidth,
height: document.documentElement.clientHeight,
deviceScaleFactor: window.devicePixelRatio,
}
}
}
"""
>>> val = html.render(script=script, reload=False)