OSDN Git Service
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).