rem: var doc = getBrowser().contentDocument; 
add: var doc = gBrowser.contentDocument; 
context: function viewPartialSourceForFragment(node, context){  gTargetNode = node;  if (gTargetNode && gTargetNode.nodeType == Node.TEXT_NODE)    gTargetNode = gTargetNode.parentNode;  // walk up the tree to the top-level element (e.g., <math>, <svg>)  var topTag;  if (context == 'mathml')    topTag = 'math';  else    throw 'not reached';  var topNode = gTargetNode;  while (topNode && topNode.localName != topTag)    topNode = topNode.parentNode;  if (!topNode)    return;  // serialize (note: the main window overrides the title set here)  var wrapClass = gWrapLongLines ? ' class="wrap"' : '';  var source =    '<html>'  + '<head><title>Mozilla</title>'  + '<link rel="stylesheet" type="text/css" href="' + gViewSourceCSS + '">'  + '<style type="text/css">'  + '#target { border: dashed 1px; background-color: lightyellow; }'  + '</style>'  + '</head>'  + '<body id="viewsource"' + wrapClass  +        ' onload="document.getElementById(\'target\').scrollIntoView(true)">'  + '<pre>'  + getOuterMarkup(topNode, 0)  + '</pre></body></html>'  ; // end  // display  var doc = getBrowser().contentDocument;  doc.open("text/html", "replace");  doc.write(source);  doc.close();}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/87d41981addf2e045f5c8f7d792f12a31742f872/viewPartialSource.js/buggy/toolkit/components/viewsource/content/viewPartialSource.js