plug-in example for dumping the frames for a single web page. Not part of build.
git-svn-id: svn://10.0.0.236/trunk@121447 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
ed1a144ecf
commit
ca0eaa3250
65
mozilla/extensions/layout-debug/plugin/test1.html
Normal file
65
mozilla/extensions/layout-debug/plugin/test1.html
Normal file
@ -0,0 +1,65 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>Debug Plug-in Test</TITLE>
|
||||
</HEAD>
|
||||
<BODY>
|
||||
|
||||
<center>
|
||||
<h1> XPConnect Scriptable Debug Plug-in </h1>
|
||||
</center>
|
||||
|
||||
|
||||
<br><br>
|
||||
|
||||
<center>
|
||||
|
||||
<embed type="application/debug-plugin" width=1 height=1 hidden="true"><br>
|
||||
|
||||
<script>
|
||||
var embed = document.embeds[0];
|
||||
var started = false;
|
||||
var theWindow;
|
||||
var outputfilename;
|
||||
|
||||
function crap()
|
||||
{
|
||||
|
||||
alert("another function");
|
||||
|
||||
}
|
||||
|
||||
|
||||
function DumpFrames(firsttime,filename)
|
||||
{
|
||||
var loadingFlag;
|
||||
|
||||
if ( firsttime ) {
|
||||
alert("opening the document");
|
||||
theWindow = window.open(filename,"dumpwindow");
|
||||
outputfilename = filename.replace (".html",".tst");
|
||||
}
|
||||
|
||||
loading = embed.DumpLayout(theWindow,"s:/tests","outputfilename");
|
||||
|
||||
if (loading != 0) {
|
||||
window.setTimeout("DumpFrames(false)",5000);
|
||||
alert("Waiting");
|
||||
} else {
|
||||
//theWindow.close();
|
||||
alert("successful");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<br>
|
||||
<form name="baseform">
|
||||
<input type="text" name="urlname">
|
||||
<input type=button value="DumpFrames" onclick='DumpFrames(true,document.baseform.urlname.value)'>
|
||||
</form>
|
||||
|
||||
</center>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
Loading…
x
Reference in New Issue
Block a user