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)
committerJames Teh <jamie@jantrid.net>
Sun, 19 Sep 2010 23:17:11 +0000 (09:17 +1000)
commit7b513c866c53d48357cd60b17bfc2058a20e9065
treecceb0baad1907732d6ad90c7e263b4150e368c04
parente26bb6c61cfae29a6112d7e0bf0a5a9fdd2467b6
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