I use the follow HTML+JS to draw outline on <div>.
But the line only flashes for less than one second. It was supposed to stay 
there.
Can anybody tell me what was wrong?

--------------------------------------------------
<html>
<script>
function flash()
{
 try{
 var ele = document.getElementById("1");

  netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
  const cid = "@mozilla.org/inspector/flasher;1";
  obj = Components.classes[cid].createInstance();
  obj = obj.QueryInterface(Components.interfaces.inIFlasher);
 alert(obj);
 alert(ele);
 obj.color = "red";
 obj.thickness = 10;
 obj.invert = true;
 alert(obj.color);
 obj.drawElementOutline(ele);
 //obj.repaintElement(ele);
 }
 catch(e) {
  alert(e);
 }
[EMAIL PROTECTED]/inspector/flasher;1
}
</script>
<body>
<div id="1" 
style="position:absolute;left:100;top:100;width:100;height:100;z-index:1;background-xcolor:yellow;">abc</div>
<div id="2" 
style="position:absolute;left:50;top:50;width:100;height:100;z-index:0;background-xcolor:blue;">abc</div>
<button onclick="flash()">Flash it!</button>
</body>
</html> 


_______________________________________________
mozilla-embedding mailing list
[EMAIL PROTECTED]
http://mail.mozilla.org/listinfo/mozilla-embedding

Reply via email to