I have two simple web pages test.html and test2.html with the following HTML:
test.html:
<html><body><a href="test2.html" target="_blank">Click to go to 2</a></body></html>
test2.html:
<html><body><a href="test.html" target="_blank">Click to go back to 1</a></body></html>
I am using a pared down extension 47884. I installed this extension on Safari by downloading, xar -xf and then using Safari Extension Builder to install and inspect the background page.
Observation
When I load test.html by typing in the URL in the address bar, app.API.ready(..) is fired in extension.js and appropriate console messages are printed both in developer tools as well as the inspection page.
When I click on the "Click to go to 2" link, a new tab opens with test2.html. However in this tab app.API.ready(..) is NOT fired in extension.js. If I type in the URL manually or refresh the page, it gets fired.
What is problematic is that this is not 100% reproducible. If I click on the link 10 times, occasionally it will start firing at the 5th or the 6th attempt and all attempts thereafter. If I kill Safari and restart, problem reappears.
Safari Version: 6.0.5 (8536.30.1)
Mac OS X Mountain Lion (10.8.5)
Loading Profile...



Twitter,
Facebook, or email.
EMPLOYEE


