}
// Note: we are not validating the event type or observer id at this
// point, this validation will be done later when we have more context.
ListenerEvent listenerEvent =
new ListenerEvent(eventType, handlerScript);
// Register the dom event listener by observer id.
ListenerEventRegistry listenerEventRegistry =
pageContext.getListenerEventRegistry();
listenerEventRegistry.addListenerById(observerAttribute, listenerEvent);