api/easyrtc.js
function event(eventName, callingFunction) {
        if (typeof eventName !== 'string') {
            self.showError(self.errCodes.DEVELOPER_ERR, callingFunction + " called without a string as the first argument");
            throw "developer error";
        }
        if (!allowedEvents[eventName]) {
            self.showError(self.errCodes.DEVELOPER_ERR, callingFunction + " called with a bad event name = " + eventName);
            throw "developer error";
        }
    }
function event(eventName, callingFunction) {
        if (typeof eventName !== 'string') {
            self.showError(self.errCodes.DEVELOPER_ERR, callingFunction + " called without a string as the first argument");
            throw "developer error";
        }
        if (!allowedEvents[eventName]) {
            self.showError(self.errCodes.DEVELOPER_ERR, callingFunction + " called with a bad event name = " + eventName);
            throw "developer error";
        }
    }
function event ( eventName , callingFunction ) { if ( typeof eventName !== 'string' ) { self . showError ( self . errCodes . DEVELOPER_ERR , callingFunction + " called without a string as the first argument" ) ; throw "developer error" ; } if ( ! allowedEvents [ eventName ] ) { self . showError ( self . errCodes . DEVELOPER_ERR , callingFunction + " called with a bad event name = " + eventName ) ; throw "developer error" ; } }
This function checks if an attempt was made to add an event listener or
or emit an unlisted event, since such is typically a typo.
@private
@param {String} eventName
@param {String} callingFunction the name of the calling function.
This function checks if an attempt was made to add an event listener or or emit an unlisted event since such is typically a typo .