Skip to content

Commit

Permalink
dom: Fix fire_event.
Browse files Browse the repository at this point in the history
  • Loading branch information
pravic committed Feb 3, 2017
1 parent a0a940e commit f1ab57a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions sciter/dom.py
Original file line number Diff line number Diff line change
Expand Up @@ -537,13 +537,13 @@ def post_event(self, code: BEHAVIOR_EVENTS, reason=EVENT_REASON.SYNTHESIZED, sou
self._throw_if(ok)
return self

def fire_event(self, source, target, code: BEHAVIOR_EVENTS, reason=EVENT_REASON.SYNTHESIZED, post=True, data=None):
"""Send or post sinking/bubbling event to the child/parent chain of he element."""
def fire_event(self, code: BEHAVIOR_EVENTS, reason=EVENT_REASON.SYNTHESIZED, source=None, post=True, data=None):
"""Send or post sinking/bubbling event to the child/parent chain of the element."""
params = sciter.capi.scbehavior.BEHAVIOR_EVENT_PARAMS()
params.cmd = code
params.reason = reason
params.he = source
params.heTarget = target
params.he = source if source else self.h
params.heTarget = self.h
if data is not None:
sciter.Value.pack_to(params.data, data)
handled = sciter.capi.sctypes.BOOL()
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
'url': 'http://github.com/pravic/pysciter/',
'download_url': 'https://github.com/pravic/pysciter/releases',
'bugtrack_url': 'https://github.com/pravic/pysciter/issues',
'version': '0.4.5',
'version': '0.4.6',
'platforms': ['Windows', 'Linux', 'MacOS X', ],
'packages': ['sciter', 'sciter.capi'],
'install_requires': [''],
Expand Down

0 comments on commit f1ab57a

Please sign in to comment.