RequestFrame test

@copyright Julien Etienne 2015

by Julien Etienne

HTML

<div></div>
<div></div>
<div></div>
<div></div>

JavaScript

var div = document.getElementsByTagName('div');
//div[3].innerHTML = mozCancelAnimationFrame || '';
    /**
     * **DISCLAIMER** not yet tested.
     * This timing functioin will return the native or prefixexd requestAnimationFrame or 
     * cancelAnimationFrame function for all modern and legacy browsers that
     * natively support the timing functions. "ms" & "o" are not required.
     * @author Julien Etienne
     * @license MIT
     * @param  {String} type   'request' | 'cancel'
     * @return {Function}      Timing function.
     */
    function RequestFrame(type) {

        // Vendor prefixes disassembled
        var vendors = ['moz', 'webkit'],
            aF = 'AnimationFrame',
            vendorCancel,
            rAF, cAF, rqAF = 'Request' + aF,
            lastTime = 0;

        /**
         * hasIOS6RequestAnimationFrameBug.
         * @See {@Link https://gist.github.com/julienetie/86ac394ec41f1271ff0a} - Commentary.
         * @Copyright 2015 - Julien Etienne. 
         * @License: MIT.
         */
        function hasIOS6RequestAnimationFrameBug() {
            var hasMobileDeviceWidth = screen.width <= 768 ? true : false,
                requiresWebkitRequestAnimationFrame = !((window.webkitRequestAnimationFrame && window.requestAnimationFrame)),
                hasNoNavigationTiming = window.performance ? false : true;
            if (requiresWebkitRequestAnimationFrame && hasMobileDeviceWidth && hasNoNavigationTiming) {
                if (window.webkitRequestAnimationFrame || window.requestAnimationFrame) {
                    console.warn('This device may contain the iOS v6x webkitRequestAnimationFrame timing bug. For timing, please use an alternative such as the "setTimeout()" or "setInterval()" API');
                    return true;
                } else {
                    console.info('hasIOS6RequestAnimationFrameBug is not applicable for this device');
                    return false;
                }
            } else {
        ...