);
}
+naRef f_eventGetTarget(naContext c, sc::Event& event)
+{
+ return NasalElement::create(c, event.getTarget().lock());
+}
+
// TODO allow directly exposing functions without parameters and return type
naRef f_eventStopPropagation(sc::Event& event, const nasal::CallContext& ctx)
{
{
NasalEvent::init("canvas.Event")
.member("type", &sc::Event::getTypeString)
+ .member("target", &f_eventGetTarget)
.method_func<&f_eventStopPropagation>("stopPropagation");
NasalMouseEvent::init("canvas.MouseEvent")
.bases<NasalEvent>()