# Yahoo! UI Library

### yui 3.3.0

Yahoo! UI Library > yui > load-tests.js (source view)
Search:
Filters Show Private Show Protected Show Deprecated

    /* This file is auto-generated by src/loader/meta_join.py */
    var add = Y.Features.add;
    // autocomplete-list-keys-sniff.js
    add('load', '0', {
        "test": function (Y) {
        // Only add keyboard support to autocomplete-list if this doesn't appear to
        // be an iOS or Android-based mobile device.
        //
        // There's currently no feasible way to actually detect whether a device has
        // a hardware keyboard, so this sniff will have to do. It can easily be
        // overridden by manually loading the autocomplete-list-keys module.
        //
        // Worth noting: even though iOS supports bluetooth keyboards, Mobile Safari
        // doesn't fire the keyboard events used by AutoCompleteList, so there's
        // no point loading the -keys module even when a bluetooth keyboard may be
        // available.
        return !(Y.UA.ios || Y.UA.android);
    },
        "trigger": "autocomplete-list"
    });
    // ie-style-test.js
    add('load', '1', {
        "test": function (Y) {

        var testFeature = Y.Features.test,
            addFeature = Y.Features.add,
            WINDOW = Y.config.win,
            DOCUMENT = Y.config.doc,
            DOCUMENT_ELEMENT = 'documentElement',
            ret = false;

        addFeature('style', 'computedStyle', {
            test: function() {
                return WINDOW && 'getComputedStyle' in WINDOW;
            }
        });

        addFeature('style', 'opacity', {
            test: function() {
                return DOCUMENT && 'opacity' in DOCUMENT[DOCUMENT_ELEMENT].style;
            }
        });

        ret =  (!testFeature('style', 'opacity') &&
                !testFeature('style', 'computedStyle'));

        return ret;
    },
        "trigger": "dom-style"
    });
    // 0
    add('load', '2', {
        "trigger": "widget-base",
        "ua": "ie"
    });
    // ie-base-test.js
    add('load', '3', {
        "test": function(Y) {
        var imp = Y.config.doc && Y.config.doc.implementation;
        return (imp && (!imp.hasFeature('Events', '2.0')));
    },
        "trigger": "node-base"
    });
    // dd-gestures-test.js
    add('load', '4', {
        "test": function(Y) {
        return (Y.config.win && ('ontouchstart' in Y.config.win && !Y.UA.chrome));
    },
        "trigger": "dd-drag"
    });
    // history-hash-ie-test.js
    add('load', '5', {
        "test": function (Y) {
        var docMode = Y.config.doc.documentMode;

        return Y.UA.ie && (!('onhashchange' in Y.config.win) ||
                !docMode || docMode < 8);
    },
        "trigger": "history-hash"
    });

Copyright © 2011 Yahoo! Inc. All rights reserved.