if (!protocolConfiguration.supportsEvents()) {
return;
}
EventAttributes eventAttributes
= attributes.getEventAttributes (false);
if (eventAttributes == null) {
return;
}
int bit = 1;
for (int i = 0; i < EventConstants.MAX_EVENTS;
i += 1, bit = bit << 1) {
// If the attribute name is not specified then ignore it.
String attributeName = eventAttributeNames [i];
if (attributeName == null) {
continue;
}
// If the supportedEvents mask doesn't have the bit associated
// with the current event set then ignore it.
if ((supportedEventsMask & bit) != bit) {
continue;
}
ScriptAssetReference userScript = eventAttributes.getEvent (i);
addEventAttribute (element, attributeName, userScript, null);
}
}