JQuery - mock click button does not call function


So, I used firebug as well as some extensions I wrote to create shortcuts on a website that I use a lot. There, on the fact that I don't understand why it doesn't work or why it's not possible:

Sample code:

<input type="button" onclick="addNewRow()" id="addRow"/>
//This will add a new row to the current table.
//The function is defined by the website (not my function)


When using firebug:

//This will simulate the button click, and will automatically add the new row.


When using google chrome extension:

//It doesn't add the new row.


Why can't the extension execute the function after the button is pressed, and why does firebug have no problem on startup?

This is normal? Is this a safety feature? or am I doing something wrong?

I know that I cannot access the existing functionality on the website for security reasons, but why doesn't fake the button launch it for me?


source to share

3 answers






Which version of Chrome are you using? There is a new protection feature Chrome Extensions that blocks inline javascript. You can read more here: http://browserfame.com/512/chrome-extension-content-security-policy



On chrome, I would rather use the WebKit developer console over the firebug extension.



All Articles