Top google-chrome Questions

List of Tags
416
PeeHaa

I just noticed that I get tons of deprecated warnings in the latest (canary) build of Chrome.

event.layerX and event.layerY are broken and deprecated in WebKit. They will be removed from the engine in the near future.

Looks like jQuery is screwing thing up.

I'm using: jquery-1.6.1.min.js.

Would it help to upgrade to the latest jQuery version or isn't it fixed yet or is it a Chrome bug or is it something else.

PS

I cannot show you code because I think it's a general error, but I suspect the warnings get thrown when I try to access a jQuery object or when jQuery tries to access the layerX / layerY (well I'm pretty sure that's the case considering the error :P).

jQuery probably copies those properties into the jQuery object.

So...

What's going on?

EDIT

jQuery 1.7 is out and fixes this issue.

Read more at their blog, here.

Answered By: Adam A ( 447)

What's going on!?

"jQuery probably copies those properties into the jQuery object." You're exactly correct, so it sounds like you already know! :)

Hopefully jQuery will update their code to stop touching that, but at the same time WebKit should have known better than to log a deprecation warning on an event (at least in my opinion). One mousemove handler and your console explodes. :)

Here's a recent jQuery ticket: http://bugs.jquery.com/ticket/10531

UPDATE: This is fixed now if you upgrade to jQuery 1.7.

Please note that if upgrading jQuery doesn't fix the issue for you it may have something to do with used extensions / plugins as Jake stated in his answer.

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 AFAIK, so the print command in Javascript Debugger will not work here. In the Javascript Console, print() will send the parameter to the printer.

There is a related question already on SO, but it does not solve my problem: http://stackoverflow.com/questions/45965/how-do-i-use-the-javascript-console-in-google-chrome

Answered By: Sergey Ilinsky ( 308)

Executing following code from the browser address bar:

javascript: console.log(2);

successfully prints message to the "JavaScript Console" in Google Chrome.

218
tomer

I am modifying a site's appearance (css modifications) but can't see the result on chrome because of annoying persistent cache. I tried shift+refresh but it doesn't work. how can i disable the cache temporarily or refresh the page in some way that the I could see the changes?

thanks.

Answered By: Steve ( 321)

There is a gear in the bottom right hand corner of the developer tools called settings that allows you to disable the cache.

On the pc you can open that by pressing ctrl+shift+i

or on the mac command+option+i

developer tool shortcuts

In build 15-18 it can be found under Network.

In build >= 19 they moved this setting into General.

photo of how to disable cache disable cache in 19

google bug tracker

A recent tweet from ChromiumDev states

Chrome DevTools' Disable Cache invalidates the disk cache (great for developing!), but.. only while devtools is visible.

195
Sebastian Hoitz

Is there anything like Firebug that you can use within Google Chrome?

Essential features I would like:

  • Inspect HTML source (select elements, delete them, etc.)
  • check CSS values (the built-in solution is weird, somehow)
Answered By: Dmitry Torba ( 185)

There is a Firebug-like tool already built into Chrome. Just right click anywhere on a page and choose "Inspect element" from the menu. Chrome has a graphical tool for debugging (like in Firebug), so you can debug JavaScript. It also does CSS inspection well and can even change CSS rendering on the fly.

For more information, see https://developers.google.com/chrome-developer-tools/

153
Kevin Driedger

When using Google Chrome, I want to debug some javascript. How can I do that?

Answered By: John Sheehan ( 157)

Windows: CTRL-SHIFT-J

Mac: ALT--J

Also available through the wrench menu (Tools > JavaScript Console):

JavaScript Console Menu