So I have copied the code from the following example on the Apple Developer site.
When I run the extension, it runs normally except the injected script is run 3 times causing the output to be written to console.log 3 times. I also put a alert in the doBigCalc function and it opened 3 alerts.
Why is this happening/is it supposed to happen?