@@ -13,7 +13,6 @@ Adding Event Handlers
1313To start out we'll just display a button that, for the moment, doesn't do anything:
1414
1515.. idom :: _examples/button_does_nothing
16- :activate-result:
1716
1817To add an event handler to this button we'll do three things:
1918
@@ -22,7 +21,6 @@ To add an event handler to this button we'll do three things:
22213. Add an ``"onClick": handle_event `` attribute to the ``<button> `` element.
2322
2423.. idom :: _examples/button_prints_event
25- :activate-result:
2624
2725.. note ::
2826
@@ -35,7 +33,6 @@ component. That's important if you want to use any arguments that may have beend
3533your component in the handler:
3634
3735.. idom :: _examples/button_prints_message
38- :activate-result:
3936
4037With all that said, since our ``handle_event `` function isn't doing that much work, if
4138we wanted to streamline our component definition, we could pass in our event handler as a
@@ -81,7 +78,6 @@ common while still giving its usages customizablity. Consider the case below whe
8178want to create a generic ``Button `` component that can be used for a variety of purpose:
8279
8380.. idom :: _examples/button_handler_as_arg
84- :activate-result:
8581
8682
8783Async Event Handlers
@@ -95,7 +91,6 @@ message in the first button. However, because the event handler is asynchronous,
9591handler for the second button is still able to respond:
9692
9793.. idom :: _examples/button_async_handlers
98- :activate-result:
9994
10095
10196Event Data Serialization
@@ -109,7 +104,6 @@ elements. Normally this would be accessible via ``event.target.currenTime``, but
109104it's simply passed in under the key ``currentTime ``:
110105
111106.. idom :: _examples/audio_player
112- :activate-result:
113107
114108
115109Client-side Event Behavior
@@ -130,7 +124,6 @@ using the :func:`~idom.core.events.event` decorator and setting ``prevent_defaul
130124example, we can stop a link from going to the specified URL:
131125
132126.. idom :: _examples/prevent_default_event_actions
133- :activate-result:
134127
135128Unfortunately this means you cannot conditionally prevent default behavior in response
136129to event data without writing :ref: `Custom Javascript Components `.
@@ -148,4 +141,3 @@ will cause the handler for the outer blue one to fire. Conversely, when it's off
148141the handler for the red element will fire.
149142
150143.. idom :: _examples/stop_event_propagation
151- :activate-result:
0 commit comments