Default for dispatch/@targetid

Just a thought about reducing the need for explicit id attributes.

Is there an argument to be had for allowing the default target of dispatch
to be the parent?

The use-case I had in mind was this, current method:

<model id="model">
   ...
   <dispatch ev:event="xforms-ready" name="my-timer"
             delay="20000" targetid="model"/>

   <action ev:event="my-timer">
     <send/>
     <dispatch name="my-timer" delay="20000"
               targetid="model"/>
   </action>
</model>

which could then be expressed

<model>
   ...
   <dispatch ev:event="xforms-ready" name="my-timer" delay="20000"/>

   <action ev:event="my-timer">
     <send/>
     <dispatch name="my-timer" delay="20000"/>
   </action>
</model>

Since nearly all events bubble, this would have the same effect, and  
relieve the necessity of having to specify an id on the model. You still  
have the option of explicitly using an id.

Steven

Received on Wednesday, 10 May 2017 10:34:38 UTC