taglib/widget-tag.js
function getExistingWidget(id, type) {
    var existingEl = document.getElementById(id);
    var existingWidget;

    if (existingEl && (existingWidget = existingEl.__widget) && existingWidget.__type === type) {
        return existingWidget;
    }

    return null;
}
function getExistingWidget(id, type) {
    var existingEl = document.getElementById(id);
    var existingWidget;

    if (existingEl && (existingWidget = existingEl.__widget) && existingWidget.__type === type) {
        return existingWidget;
    }

    return null;
}
function getExistingWidget ( id , type ) { var existingEl = document . getElementById ( id ) ; var existingWidget ; if ( existingEl && ( existingWidget = existingEl . __widget ) && existingWidget . __type === type ) { return existingWidget ; } return null ; }
Look in in the DOM to see if a widget with the same ID and type already exists.
Look in in the DOM to see if a widget with the same ID and type already exists .