javascript error in jssh in firefox 4.0b1 -
This javascript is compiled via jssh and creates a strange message that is built for the new Firefox 4.0 Beta 1. Here's the code (sorry that it is a bit messy) In a nutshell, the code sees all the frames of a Firefox window, which is a test page for our unit tests for an entity, which has an octave in which a goodbye wanderfill instead of saying goodbye Unsuccessful response back we are finally receiving this odd nserror which we can not interpret.
var firefoxWindow = getWindows () [0]; Var Browser = Firefox Window.getBrowser (); Var doc = browser.contentDocument; Var elem = null; Var elems = doc.getElementsByTagName ('TD'); For (A = 0; a & lt; elems.length; a ++) {If (((AIIMS [A]! == Null & amp; Ams [A] .has Properties () === True & amp; ; Ams [A] .getAttribute ('onclick')! == Null & amp; Ams [a] .getAttribute ('onclick') ToString (.) Match (/ doNothing / gim)! = Null & amp; amp; [A] .getAttribute ('onclick') ToString (.) Match (/ Bye Wonderful / Jim) Length = gt; = (0) || (AIIMS [A]! == Zero & amp; Ams [A] Click! == Null & amp; Ams [A] Click String (.) Match (/ Goodbye / Amazing Jim!) == Faucet & amp; Ams [a]. Clickclick.toString (.) Match (/ Goodbye wonderful / gym) Length = gt; =))) {elem = elems [a]; }} Found = false; Var window = null; (Var i = 0; i & lt; firefoxWindow.frames.length; i ++) {if (firefox window.frames [i] .toString (). ToLowerCase (). IndexOf ('object window') & gt; ; -1) {windows = firefox window.frames [i]; Break;}} function recursive search (frame) {for (var i = 0; i & lt; frame. Length; i ++) {var elems = frames [i] .document.getElementsByTagName ('td'); For (A = 0; a & lt; elems.length; a ++) {If (((AIIMS [A]! == Null & amp; Ams [A] .has Properties () === True & amp; ; Ams [A] .getAttribute ('onclick')! == Null & amp; Ams [A] .getAttribute ('onclick') ToString (.) Match (/ Goodbye wonderful / gym)! == Faucet & amp; Ams [A] .getAttribute ('onclick') ToString () Match (/ Bye Wonderful / Jim) Length: gt; = 0) || (AIIMS [A]! == Faucet & amp; amp; Ames [A] Onclick! == Null & amp; Ams [A]. Onclick.toString (.) Match (/ Goodbye / Amazing Jim!) == Faucet & Ames [a]. Onclick.toString () Match (/ Goodbye wonderful / gym) Length = gt; =))) {elem = elems [a]; }} If (AMM) {found = true; Return;} and (if (frame [i] .frames.length & gt; 0) {recursive search (frame [i]. Frame);}}}} if (! Elem & window.frames.length & gt; ; 0) {recursive search (window.frames);} var origColor = ''; if (elem! == null) {origColor = elem.style.backgroundColor; if (origColor === faucet) {origColor = ''; } Elem.style.backgroundColor = 'yellow';}
Return message sent here: jssh:
has been received: Exception exception without: [exception. "Component is not available" nsresult: "0x80040111 (NS_ERROR_ONA_AVAlLL)" location: "JS frame :: interactive :: :: line1" data: no]
JS is no longer supported in Firefox 4 and it is a mess to handle it because it is mostly written in JavaScript and by adding its javascript command directly to the extension There is a better way to accomplish a few things.
Comments
Post a Comment