import webview
def custom_logic(window):
window.evaluate_js(" var list = document.getElementById('text').getBoundingClientRect(); alert(JSON.stringify(list));")
window = webview.create_window('Woah dude!', 'https://ya.ru')
webview.start(custom_logic, window)