Working on an add-on code that includes parameter passing between the add-on scripts and content script.But on execution of content script i am getting the Out of memory
error. The code for content script is
var id = document.getElementById("usermail");
var pass = document.getElementById("password");
var values;
function loginClk() { //function called on click of login button
values = '{ "employees" : [' +'{ "firstName":'+id.value+' , "lastName":'+pass.value+' } ]}';
getFirstPara();
};
self.port.on("get-first-para", getFirstPara);
function getFirstPara() { // function for communication with add-on script
var firstPara = values;
alert(firstPara);
firstPara ="hello";
self.port.emit("first-para", firstPara);
}
Would be great if someone could help me out in finding the error that results in out of memory error.