function queue$1(element, animation, queueName) {
    var data = Data(element);
    if (queueName !== false) {
        // Store the last animation added so we can use it for the
        // beginning of the next one.
        data.lastAnimationList[queueName] = animation;
    }
    if (queueName === false) {
        animate(animation);
    } else {
        if (!isString(queueName)) {
            queueName = "";
        }
        var last = data.queueList[queueName];
        if (!last) {
            if (last === null) {
                data.queueList[queueName] = animation;
            } else {
                data.queueList[queueName] = null;
                animate(animation);
            }
        } else {
            while (last._next) {
                last = last._next;
            }
            last._next = animation;
            animation._prev = last;
        }
    }
}
Add an item to an animation queue.