isJavaScript = type.EqualsIgnoreCase("text/javascript");
nsAutoString  mimeType; nsAutoString  params; SplitMimeType(type, mimeType, params);  isJavaScript = mimeType.EqualsIgnoreCase("text/javascript");
XULContentSinkImpl::OpenScript(const nsIParserNode& aNode){    nsresult rv = NS_OK;    PRBool   isJavaScript = PR_TRUE;    PRInt32 i, ac = aNode.GetAttributeCount();    // Look for SRC attribute and look for a LANGUAGE attribute    nsAutoString src;    for (i = 0; i < ac; i++) {        const nsString& key = aNode.GetKeyAt(i);        if (key.EqualsIgnoreCase("src")) {            src = aNode.GetValueAt(i);            nsRDFParserUtils::StripAndConvert(src);        }        else if (key.EqualsIgnoreCase("type")) {            nsAutoString  type(aNode.GetValueAt(i));            nsRDFParserUtils::StripAndConvert(type);            isJavaScript = type.EqualsIgnoreCase("text/javascript");        }        else if (key.EqualsIgnoreCase("language")) {            nsAutoString  lang(aNode.GetValueAt(i));            nsRDFParserUtils::StripAndConvert(lang);            isJavaScript = nsRDFParserUtils::IsJavaScriptLanguage(lang);        }    }      // Don't process scripts that aren't JavaScript    if (isJavaScript) {        nsAutoString script;        // If there is a SRC attribute...        if (src.Length() > 0) {            // Use the SRC attribute value to load the URL            nsIURL* url = nsnull;            nsAutoString absURL;            nsIURLGroup* urlGroup;            rv = mDocumentURL->GetURLGroup(&urlGroup);                  if ((NS_OK == rv) && urlGroup) {                rv = urlGroup->CreateURL(&url, mDocumentURL, src, nsnull);                NS_RELEASE(urlGroup);            }            else {                rv = NS_NewURL(&url, absURL);            }            if (NS_OK != rv) {                return rv;            }            // Add a reference to this since the url loader is holding            // onto it as opaque data.            NS_ADDREF(this);            nsIUnicharStreamLoader* loader;            rv = NS_NewUnicharStreamLoader(&loader,                                           url,                                            (nsStreamCompleteFunc)DoneLoadingScript,                                            (void *)this);            NS_RELEASE(url);            if (NS_OK == rv) {                rv = NS_ERROR_HTMLPARSER_BLOCK;            }        }        mInScript = PR_TRUE;        mConstrainSize = PR_FALSE;        mScriptLineNo = (PRUint32)aNode.GetSourceLineNumber();        PushResourceAndState(nsnull, mState);        mState = eXULContentSinkState_InScript;    }    return rv;}