@@ -510,35 +510,13 @@ def FindBuildSubItemEvents(self):
510
510
result = self .dispatch .Invoke (
511
511
dispid , 0x0 , pythoncom .DISPATCH_PROPERTYGET , 1
512
512
)
513
- # IE has an interesting problem - there are lots of synonyms for the same object. Eg
514
- # in a simple form, "window.top", "window.window", "window.parent", "window.self"
515
- # all refer to the same object. Our event implementation code does not differentiate
516
- # eg, "window_onload" will fire for *all* objects named "window". Thus,
517
- # "window" and "window.window" will fire the same event handler :(
518
- # One option would be to check if the sub-object is indeed the
519
- # parent object - however, this would stop "top_onload" from firing,
520
- # as no event handler for "top" would work.
521
- # I think we simply need to connect to a *single* event handler.
522
- # As use in IE is deprecated, I am not solving this now.
523
513
if isinstance (
524
514
result , pythoncom .TypeIIDs [pythoncom .IID_IDispatch ]
525
515
):
526
516
name = names [0 ]
527
517
subObj = self .GetCreateSubItem (
528
518
self , name , result , axscript .SCRIPTITEM_ISVISIBLE
529
519
)
530
- # print(
531
- # "subobj",
532
- # name,
533
- # "flags are",
534
- # subObj.flags,
535
- # "mydisp=",
536
- # self.dispatch,
537
- # "result disp=",
538
- # result,
539
- # "compare=",
540
- # self.dispatch == result,
541
- # )
542
520
subObj .BuildEvents ()
543
521
subObj .Register ()
544
522
except pythoncom .com_error :
@@ -727,15 +705,6 @@ def ParseProcedureText(
727
705
startingLineNumber ,
728
706
flags ,
729
707
)
730
- # NOTE - this is never called, as we have disabled this interface.
731
- # Problem is, once enabled all even code comes via here, rather than AddScriptlet.
732
- # However, the "procName" is always an empty string - ie, itemName is the object whose event we are handling,
733
- # but no idea what the specific event is!?
734
- # Problem is disabling this block is that AddScriptlet is _not_ passed
735
- # <SCRIPT for="whatever" event="onClick" language="Python">
736
- # (but even for those blocks, the "onClick" information is still missing!?!?!?)
737
-
738
- # self.DoAddScriptlet(None, code, itemName, subItemName, eventName, delimiter,sourceContextCookie, startLineNumber)
739
708
return None
740
709
741
710
#
@@ -925,21 +894,11 @@ def Clone(self):
925
894
#
926
895
# IObjectSafety
927
896
928
- # Note that IE seems to insist we say we support all the flags, even tho
929
- # we don't accept them all. If unknown flags come in, they are ignored, and never
930
- # reflected in GetInterfaceSafetyOptions and the QIs obviously fail, but still IE
931
- # allows our engine to initialize.
932
897
def SetInterfaceSafetyOptions (self , iid , optionsMask , enabledOptions ):
933
- # trace ("SetInterfaceSafetyOptions", iid, optionsMask, enabledOptions)
898
+ # trace("SetInterfaceSafetyOptions", iid, optionsMask, enabledOptions)
934
899
if optionsMask & enabledOptions == 0 :
935
900
return
936
901
937
- # See comments above.
938
- # if (optionsMask & enabledOptions & \
939
- # ~(axscript.INTERFACESAFE_FOR_UNTRUSTED_DATA | axscript.INTERFACESAFE_FOR_UNTRUSTED_CALLER)):
940
- # # request for options we don't understand
941
- # RaiseAssert(scode=winerror.E_FAIL, desc="Unknown safety options")
942
-
943
902
if iid in [
944
903
pythoncom .IID_IPersist ,
945
904
pythoncom .IID_IPersistStream ,
0 commit comments