function setId(element) {
        var state = getState(element);

        if (!state) {
            throw new Error("setId required the element to have a resize detection state.");
        }

        var id = idGenerator.generate();

        state.id = id;

        return id;
    }
Sets the resize detector id of the element. Requires the element to have a resize detector state initialized.
@public
@param {element} element The target element to set the id of.
@returns {string|number|null} The id of the element.