dart - Handling clickevents from webcomponents inside of other webcomponents -
i have used dart webui create component contains component this.
the desired respons clicking had when click on inner component fires inside of inner component , not affect component contains it. click event on inner component fires both in inner , in outer component.
is there way handle click on inside , prevent "bubbling" parent element?
<!doctype html> <html> <head> <link rel="import" href="coloritem.html"> </head> <body> <element name="color-item-with-inside-color-item" constructor="coloritemwithinsidecoloritem" extends="coloritem"> <template> <style scoped> #inner-color-item div{ border:5px solid whitesmoke; } #inner-color-item { margin-top:10px; margin-bottom:0px; } </style> <color-item color_text="{{color_text}}" bg_color="{{bg_color}}" text_color="{{text_color}}"> <color-item id="inner-color-item" style></color-item> <!-- inner item --> </color-item> </template> <script type="application/dart" src="coloritemwithinsidecoloritem.dart"></script> </element> </body> </html>
on mouse event evt should able call evt.stoppropagation() prevent bubbling up.
Comments
Post a Comment