This commit is contained in:
Kovid Goyal 2019-08-20 18:23:21 +05:30
parent 755cf383a3
commit 37bde2c949
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -119,7 +119,8 @@ def onclick(event):
tn = e.tagName.toLowerCase() if e.tagName else '' tn = e.tagName.toLowerCase() if e.tagName else ''
href = e.getAttribute('href') href = e.getAttribute('href')
e = e.parentNode e = e.parentNode
to_python.request_sync(tn, href, address) if to_python.request_sync:
to_python.request_sync(tn, href, address)
return False return False
@from_python @from_python
@ -130,7 +131,8 @@ def go_to_anchor(anchor):
if elem: if elem:
elem.scrollIntoView() elem.scrollIntoView()
address = get_sourceline_address(elem) address = get_sourceline_address(elem)
to_python.request_sync('', '', address) if to_python.request_sync:
to_python.request_sync('', '', address)
@from_python @from_python
def live_css(editor_name, sourceline, tags): def live_css(editor_name, sourceline, tags):