265
votes
11answers
195k views

How to print debug messages in the Google Chrome Javascript Console

Does anyone know how to print debug messages in the Google Chrome Javascript Console? Please note that the Javascript Console is not the same as the Javascript Debugger, they have different syntaxes ...
178
votes
10answers
240k views

How do you launch the javascript debugger in Google Chrome?

When using Google Chrome, I want to debug some javascript. How can I do that?
145
votes
25answers
167k views

Get real image width and height with JavaScript in Safari/Chrome?

I am creating a jQuery plugin. How do I get real image width and height with Javascript in Safari? Following works with Firefox 3, IE7 and Opera 9: var pic = $("img") // need to remove these in of ...
128
votes
1answer
48k views

Updating address bar with new URL without hash or reloading the page

I either dreamt about chrome (dev channel) implementing a way to update the address bar via javascript (the path, not domain) without reloading the page or they really have done this... However...I ...
121
votes
5answers
57k views

“Unsafe JavaScript attempt to access frame with URL…” error being continuously generated in Chrome webkit inspector

Chrome (or any other webkit browser) throws a ton of these "Unsafe JavaScript attempt to access frame with URL..." when working with the Facebook API for example. It doesn't interfere with actual ...
106
votes
5answers
83k views

Chrome: Disable same origin policy

Is there a way to disable the same origin policy on Google's Chrome browser? This is strictly for development, not production, use.
93
votes
3answers
11k views

IE/Chrome: are DOM tree elements global variables here?

Working on an idea for a simple HTMLElement wrapper I stumbled upon the following for IE and Chrome: for a given HTMLElement with ID in the DOM tree, it is possible to retrieve the div using its ID ...
73
votes
5answers
27k views

Chrome desktop notification example?

Is there an hosted example code (Javascript) that demonstrates Chrome desktop notifications? I'd like that use that in my own code. Update: Here's a blog post explaining webkit notifications with an ...
67
votes
14answers
39k views

Detect blocked popup in Chrome

I am aware of javascript techniques to detect whether a popup is blocked in other browsers (as described in the answer to this question). Here's the basic test: var newWin = window.open(url); ...
55
votes
2answers
12k views

Set a javascript breakpoint in code - in chrome?

I want to force the chrome debugger to break on a line via code, or else using some sort of comment tag such as something like console.break(). Is there a way to do this?
55
votes
7answers
46k views

Facebook gives “Unsafe JavaScript attempt to access frame with URL” error in Chrome

My sample Facebook app was working great yesterday in Chrome. The page integrates Silverlight ad Facebook via the JavaScript SDK. I can check basic login status, login to Facebook, get your name and ...
54
votes
2answers
24k views

Resource interpreted as Script but transferred with MIME type text/plain - for local file

I'm getting a "Resource interpreted as Script but transferred with MIME type text/plain" warning in Google Chrome when including a local script file. I know the problem appears when loading a file ...
53
votes
5answers
17k views

JavaScript: Is there a way to get Chrome to break on all errors?

I am looking for an equivalent in Chrome to the "break on all errors" functionality of Firebug. In the Scripts tab, Chrome has a "pause on all exceptions", but this is not quite the same as breaking ...
51
votes
14answers
11k views

Cryptic “Script Error.” reported in Javascript in Chrome and Firefox

I have a script that detects Javascript errors on my website and sends them to my backend for reporting. It reports the first error encountered, the supposed line number, and the time. EDIT to ...
50
votes
4answers
98k views

Chrome Uncaught Syntax Error: Unexpected Token ILLEGAL [duplicate]

Possible Duplicate: SyntaxError: Unexpected token ILLEGAL Receiving the subject error when Chrome tries to load the script file on the page. It says it's at the last line of the javascript ...

1 2 3 4 5 354
15 30 50 per page