OSDN Git Service

Monkeypatch comtypes so that NVDA can work a bit better with Internet Explorer 9...
authorMichael Curran <mick@kulgan.net>
Sun, 19 Sep 2010 23:17:11 +0000 (09:17 +1000)
committerMichael Curran <mick@kulgan.net>
Sun, 19 Sep 2010 23:17:11 +0000 (09:17 +1000)
commit83df914c1b198a3a013c705f658c0127400a1d93
tree446a9f3940dd2af79a9c071342d22bfb90fe9091
parent94bb81d600489ab043f079945f58e116d17c87d3
Monkeypatch comtypes so that NVDA can work a bit better with Internet Explorer 9 (stops errors when trying to navigate documents not in compatibility view). In short MSHTML automation implementation is now  giving back some properties as variables, rather than just functions (method, propget, propput or propputref), yet comtypes lazybind dynamic IDispatch support does not support variables yet. Specifically: in NVDA's core.py: wrap the existing implementation of __getattr__ on comtypes.client.lazybind.Dispatch with code that catches any attribute or name errors and  falls back to fetching the property using the older dynamic Dispatch impmentation (comtypes.client.dynamic._Dispatch).
source/core.py