Skip to content

requestAnimationFrame and cancelAnimationFrame undifined in IE browser .  #219

Closed
@nishantk9870

Description

var requestAnimationFrame is undifiened in the IE broser which intersepts the variable being used in GO.js which causes problems in the applications .

/*jshint -W079 */
var requestAnimationFrame = window.requestAnimationFrame;
if (typeof requestAnimationFrame === 'undefined') {
if (typeof webkitRequestAnimationFrame !== 'undefined') {
/*global requestAnimationFrame:true */
requestAnimationFrame = webkitRequestAnimationFrame;
}

if (typeof mozRequestAnimationFrame !== 'undefined') {
    /*global requestAnimationFrame:true */
    requestAnimationFrame = mozRequestAnimationFrame;
}

if (typeof window.requestAnimationFrame === 'undefined') {
  window.requestAnimationFrame = window.requestAnimationFrame || function (callback) { window.setTimeout(callback, 0) };
}

}

/*jshint -W079 */
var cancelAnimationFrame = window.cancelAnimationFrame;
if (typeof cancelAnimationFrame === 'undefined') {
if (typeof webkitCancelAnimationFrame !== 'undefined') {
/*global cancelAnimationFrame:true */
cancelAnimationFrame = webkitCancelAnimationFrame;
}

if (typeof mozCancelAnimationFrame !== 'undefined') {
    /*global cancelAnimationFrame:true */
    cancelAnimationFrame = mozCancelAnimationFrame;
}

if (typeof window.cancelAnimationFrame === 'undefined') {
  window.cancelAnimationFrame = window.requestAnimationFrame || function (callback) { window.setTimeout(callback, 0) };
}

}

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions