/*
*+------------------------------------------------------------------------+
*| Licensed Materials - Property of IBM
*| IBM Cognos Products: Viewer
*| (C) Copyright IBM Corp. 2001, 2020
*|
*| US Government Users Restricted Rights - Use, duplication or
*| disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
*|
*+------------------------------------------------------------------------+
*/
/**
Loads dynamically CSS and JavaScript files and execute inline scripts found in HTML code in the response outputs.
@constructor
*/
function CScriptLoader(sWebContentRoot)
{
/**
Array of files to load.
@type array
@private
*/
this.m_oFiles = {};
/**
Array of inline script to execute.
@type array
@private
*/
this.m_aScripts = [];
/**
Array of document.writes/document.writeln to execute.
@type array
@private
*/
this.m_aDocumentWriters = [];
this.m_ajaxWarnings = [];
this.m_bIgnoreAjaxWarnings = false;
this.m_bHandleStylesheetLimit = false;
/**
Length of the interval (in Milliseconds) to check if files are done loading and that we can execute the inline scripts.
@type integer
@private
*/
this.m_iInterval = 20;
/**
Regular expression to retrieve CSS file paths.
@type RegularExpression
@private
*/
this.m_reFindCssPath = new RegExp(']*href="([^"]*)"', "i");
/**
Regular expression to retrieve CSS inline code.
@type RegularExpression
@private
*/
this.m_reFindInlineStyle = /