~ted/lazr-js/annoying-debug-message

« back to all changes in this revision

Viewing changes to src-js/lazrjs/yui/yui/get-debug.js

  • Committer: Launchpad Patch Queue Manager
  • Date: 2010-09-09 14:20:30 UTC
  • mfrom: (182.1.3 yui-3.2)
  • Revision ID: launchpad@pqm.canonical.com-20100909142030-13w6vo0ixfysxc15
[r=beuno] Update lazr-js to yui-3.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
Copyright (c) 2010, Yahoo! Inc. All rights reserved.
3
3
Code licensed under the BSD License:
4
4
http://developer.yahoo.com/yui/license.html
5
 
version: 3.1.2
6
 
build: 56
 
5
version: 3.2.0
 
6
build: 2676
7
7
*/
8
8
YUI.add('get', function(Y) {
9
9
 
240
240
     */
241
241
    _next = function(id, loaded) {
242
242
        // Y.log("_next: " + id + ", loaded: " + (loaded || "nothing"), "info", "get");
243
 
        var q = queues[id], msg, w, d, h, n, url, s;
 
243
        var q = queues[id], msg, w, d, h, n, url, s,
 
244
            insertBefore;
244
245
 
245
246
        if (q.timer) {
246
247
            // Y.log('cancel timer');
307
308
        // add the node to the queue so we can return it to the user supplied callback
308
309
        q.nodes.push(n);
309
310
 
310
 
        // add it to the head or insert it before 'insertBefore'
311
 
        if (q.insertBefore) {
312
 
            s = _get(q.insertBefore, id);
 
311
        // add it to the head or insert it before 'insertBefore'.  Work around IE
 
312
        // bug if there is a base tag.
 
313
        insertBefore = q.insertBefore || 
 
314
                       d.getElementsByTagName('base')[0];
 
315
 
 
316
        if (insertBefore) {
 
317
            s = _get(insertBefore, id);
313
318
            if (s) {
314
 
                Y.log('inserting before: ' + q.insertBefore);
 
319
                Y.log('inserting before: ' + insertBefore, 'info', 'get');
315
320
                s.parentNode.insertBefore(n, s);
316
321
            }
317
322
        } else {
390
395
 
391
396
        q.attributes = q.attributes || {};
392
397
        q.attributes.charset = opts.charset || q.attributes.charset || 'utf-8';
393
 
        // var charset = opts.charset || q.attributes.charset;
394
 
        // if (charset) {
395
 
        //     q.attributes.charset = charset;
396
 
        // }
397
398
 
398
 
        setTimeout(function() {
399
 
            _next(id);
400
 
        }, 0);
 
399
        _next(id);
401
400
 
402
401
        return {
403
402
            tId: id
479
478
     * @private
480
479
     */
481
480
    _purge = function(tId) {
482
 
        var n, l, d, h, s, i, node, attr,
 
481
        var n, l, d, h, s, i, node, attr, insertBefore,
483
482
            q = queues[tId];
 
483
            
484
484
        if (q) {
485
485
            n = q.nodes; 
486
486
            l = n.length;
487
487
            d = q.win.document;
488
488
            h = d.getElementsByTagName("head")[0];
489
489
 
490
 
            if (q.insertBefore) {
491
 
                s = _get(q.insertBefore, tId);
 
490
            insertBefore = q.insertBefore || 
 
491
                           d.getElementsByTagName('base')[0];
 
492
 
 
493
            if (insertBefore) {
 
494
                s = _get(insertBefore, tId);
492
495
                if (s) {
493
496
                    h = s.parentNode;
494
497
                }
642
645
         * loaded.
643
646
         * </dd>
644
647
         * <dt>insertBefore</dt>
645
 
         * <dd>node or node id that will become the new node's nextSibling</dd>
 
648
         * <dd>node or node id that will become the new node's nextSibling.  If this
 
649
         * is not specified, nodes will be inserted before a base tag should it exist.
 
650
         * Otherwise, the nodes will be appended to the end of the document head.</dd>
646
651
         * </dl>
647
652
         * <dt>charset</dt>
648
653
         * <dd>Node charset, default utf-8 (deprecated, use the attributes config)</dd>
744
749
})();
745
750
 
746
751
 
747
 
}, '3.1.2' );
 
752
}, '3.2.0' );