Tag: google chrome

Uncaught SyntaxError: Unexpected token :

I am running an AJAX call in my MooTools script, this works fine in Firefox but in Chrome I am getting a Uncaught SyntaxError: Unexpected token : error, I cannot determine why. Commenting out code to determine where the bad code is yields nothing, I am thinking it may be a problem with the JSON […]

How to save the output of a console.log(object) to a file?

I tried using JSON.stringify(object), but it doesn’t go down on the whole structure and hierarchy. On the other hand console.log(object) does that but I cannot save it. In the console.log output I can expand one by one all the children and select and copy/paste but the structure is to big for that.

Javascript / Chrome – How to copy an object from the webkit inspector as code

I am doing a console.log statement in my javascript in order to log a javascript object. I’m wondering if there’s a way, once that’s done – to copy that object as javascript code. What I’m trying to do is convert an object that was created using ajax to parse an xml feed into a static […]

Chrome doesn't delete session cookies

I’m trying to set session cookie in javascript like this: document.cookie = ‘name=alex; path=/’ But Chrome doesn’t delete it even if I quit browser and launch it again. I checked in Firefox and Opera and both work as intended – they delete session cookie on browser exit. Is Chrome just ignoring expiration rules? I checked […]

JavaScript: How to find out if the user browser is Chrome?

I need some function returning a boolean value to check if the browser is Chrome. How do I create such functionality?

How to wait until an element exists?

I’m working on an Extension in Chrome, and I’m wondering: what’s the best way to find out when an element comes into existence? Using plain javascript, with an interval that checks until an element exists, or does jQuery have some easy way to do this?

Why is {} + {} no longer NaN in Chrome console?

I noticed today that Chrome 49 no longer outputs NaN when you type {}+{} into the console. Instead it outputs the string [object Object][object Object]. Why is this? Did the language change?

Chrome Uncaught Syntax Error: Unexpected Token ILLEGAL

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 file. I can’t seem to find anything wrong with it. No errors in firefox, and the script works as expected. Just using form validation […]

Finding JavaScript memory leaks with Chrome

I’ve created a very simple test case that creates a Backbone view, attaches a handler to an event, and instantiates a user-defined class. I believe that by clicking the “Remove” button in this sample, everything will be cleaned up and there should be no memory leaks. A jsfiddle for the code is here: http://jsfiddle.net/4QhR2/ // […]

Include javascript file in chrome console

is there a simpler (native perhaps?) way to include a external script file in the google chrome browsers? Currently I’m doing it like this: document.head.innerHTML+='<script src=”http://example.com/fil.js”></script>’;