WebKit Bugzilla
Attachment 373043 Details for
Bug 199282
: AX: [ATK] Text in anonymous blocks not emitting caret-moved events
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
pyatspi accessible-event listener: text-caret-moved.py
text-caret-moved.py (text/x-python), 575 bytes, created by
Joanmarie Diggs
on 2019-06-27 12:11:51 PDT
(
hide
)
Description:
pyatspi accessible-event listener: text-caret-moved.py
Filename:
MIME Type:
Creator:
Joanmarie Diggs
Created:
2019-06-27 12:11:51 PDT
Size:
575 bytes
patch
obsolete
>#!/usr/bin/python3 > >import pyatspi > >def listener(e): > attributes = e.source.getAttributes() > if ('toolkit:gtk') in attributes: > return > > text = e.source.queryText() > print("\nCaret moved to offset %i in %s" % (e.detail1, e.source)) > print("Character at offset: '%s' (%i, %i)" % text.getTextAtOffset(e.detail1, pyatspi.TEXT_BOUNDARY_CHAR)) > print("Line at offset: '%s' (%i, %i)" % text.getTextAtOffset(e.detail1, pyatspi.TEXT_BOUNDARY_LINE_START)) > >pyatspi.Registry.registerEventListener(listener, "object:text-caret-moved") >pyatspi.Registry.start() >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 199282
: 373043 |
373044