javascript - Cannot get Chrome popup.js to use console.log -
i utilize console.log heavily debug when writing js. trying utilize in writing chrome extensions not working. there trickery involved here???
popup.html
<!doctype html public "-//w3c//dtd html 4.01//en" "http://www.w3.org/tr/html4/strict.dtd"> <html> <head> <link type="text/css" rel="stylesheet" href="css/jquery-ui-1.10.0.custom.min.css" /> <script type="text/javascript" src="js/jquery-1.9.1.min.js"></script> <script type="text/javascript" src="js/jquery-ui-1.10.0.custom.min.js"></script> <script type="text/javascript" src="js/popup.js"></script> </head> <body style="width: 200px"> </body>
popup.js
console.log('test1'); $(document).ready(function() { console.log('test2'); });
neither of these appear in js debugger.
even had problem initially... create sure have right developer tool windows opened.. mean, might have opened developer tool windows main page rather extension's page (ie. popup.html). open developer window inspecting popup, right click on popup , click inspect element... opens right developer windows..
i had made stupid error , stuck.. :)
javascript google-chrome-extension
No comments:
Post a Comment