synthetic.js revision ceb19fa62e52ed1c844974d2448f5d6dc5aaac64
var subs = this.subscribers,
return sub;
}
}
}
return sub;
}
}
}
return null;
};
function SyntheticEvent(cfg) {
}
},
ce, // Custom event published on node
node, // Node wrapper for el
payload, // extra info extracted from the args by implementation
_handles, // Collection of detach handles for array subs
handle; // The detach handle for this subscription
// Y.on normalizes Nodes to DOM nodes and NodeLists to an array of DOM
// nodes. Other possible value is a selector string.
// If not found by query, trigger deferral.
} else {
});
}
}
// Array of elements get collection handle
_handles = [];
args[2] = n;
});
// EventHandle can be constructed with an array of other handles
}
// Single element subscription
if (!handle) {
// from the subscription args
// Get or publish a custom event on the Node with the synthetic
// event's name.
if (!ce) {
// node.detach() with type missing doesn't reach adapter fork
};
// Decorate and register like a DOM ce to support purgeElement
// This will route through Y.Env.remove - the wrapper for
// removeEventListener/detachEvent. To avoid cross browser
// issues, a real event name and dummy function are used to
// make the DOM detach a noop
fn : function () {},
capture: false
});
}
// Disallow duplicates.
// Subscribe to the hosted custom event
// Override the handle's detach method to pass through to the
// the this instance's detach method
};
// Pass control to the implementation code
}
}
}
return handle;
},
ce, // The custom event published on the Node
sub; // The subscription tied to this fn and el
// Detach doesn't normalize Node or NodeList
el = null;
}
if (el) {
// Iterate detach by looping back for each item
args[2] = n;
});
return ret;
}
// Single element subscription detach. Wrap in a Node because
// that's how the subscription/context is enabled
// Get the custom event named for the synthetic event from the Node.
// Node uses Y.augment(Node, EventTarget), so _yuievt won't be
// present until an API method is called.
// @TODO: do I need to do the object default?
// Get the Subscriber object for this fn and context
if (sub) {
// detach called without a fn = detach all subs
// @TODO: this and the generic return should return an int
if (!fn) {
while (sub) {
}
return ret;
}
}
// Standard detach cleanup
ret = 1;
}
}
return ret;
},
_processArgs: function (args) {
return null;
}
};
type :
// no redefinition allowed
}
};