![]() Similarly events associated with age should expect to be called with a number argument ![]() ![]() Should be passed a value of the type associated with the name attributeInThePassedObject thus, since firstName is typed as string, the callback for the firstNameChanged event expects a string to be passed to it at call time.The eventName should be of the form attributeInThePassedObject + "Changed" thus, firstNameChanged as derived from the attribute firstName in the base object. The on function that will be added to the base object expects two arguments, an eventName (a string) and a callBack (a function). ![]()
0 Comments
Leave a Reply. |