In ChromeDevTools, how do I stop/halt the page when it's reaching an endless JavaScript loop error? - google-chrome-devtools

I am working on a webpage which is created based on jQuery and jQuery UI.
As jQuery-UI is too big, I'd like to remove it and write my own easing functions.
However, after removing the jQuery UI, I got an endless error in my ChromeDevTool:
Though I know how to fix the bug, is there any way that I could halt the page in this situation?
Thanks

Related

0fps in chrome performance css animation got stuck

I have some loading icons which are purely written in CSS. Sometimes I am facing issue like, the css animations got stuck at some time. While analysing the same thing in developer tools performance tab, I found it results in 0 fps for the time being during some synchronous ajax calls(My project's requirement). Dont know why sync ajax call stuck the CSS animation. Sometimes even if there is no sync ajax calls, during some time consuming JS funtion also stucks the CSS animation. Please help

Facebook SDK inside Firefox (callback from content window to window)

I’m developing a Firefox addon and I would like to use facebook sdk in it. One of the features that I like to use is the callback that is triggered when a like button is pressed. In detail I mean this one:
FB.Event.subscribe('edge.create', function() {dump("like pressed"); });
Currently I’m doing it this way. I open a layer in the current window with an iframe. That iframe contains the facebook api + the features that I would like to use. My problem is that I can’t call my addons functions from the inside of that iframe. What I would like to do would be something like:
FB.Event.subscribe('edge.create', function() {fbClass.like(); });
In my mind I’ve one idea. I think to make it safe it would be ok to create an empty hidden div container in that iframe, attach an eventlistener to it and fill it with json. Then use firefox safe json loader to receive it.
Any other idea how I could accomplish that one without creating a security issue?
I tried porting the FB api to FF but it leaded into a waste of time. Sure I got some features work but it’s that complex to debug it and in case if the api changes I would have to do it again. So I think the iframe way would be a much better one.
I would suggest to you that use the Add-on SDK makes this task probably easier. You could add your code to the page using PageMod and from the content script calls your addon's function using postMessage. This also helps to you decoupled the content code from the addon code.

Period in my post parameter

I am getting a 404 error when I am posting the contents of a textarea to my .NET mvc 2 controller. The following URL causes the issue:
UpdateField/1/Conclusion/Test%20Conclusion.
That period at the end seems to cause it because when I remove it, the call works perfectly. I will need to support a period at the end as it's user input for a report. I'm also getting reports that a period anywhere else in the textarea is also causing the same problem, but that doesn't happen to me although I'll still need to work towards a correction.
Any suggestions on how I can either correct this or work around it?
As a side note, I am building the URL as a string and passing it to jQuery ajax call.
UPDATE:
I couldn't come up with a quick enough solution so I rewrote this to use MS ajax instead of jQuery ajax and it seems to work fine through that. Still don't know why this is happening with jQuery.

facebook load xd_proxy.php while scrolling

Hi anyone have idea what's going on with the iframe apps on facebook keep loading the xd_proxy.php? I haven't notice it's a new or existing issue because my apps screen is fix, today, when I change some code,I scrolling the screen with my mouse, and discover that the xd_proxy is loading while scrolling(no matter use mouse wheel, kb arrow, scroll bar..), I search some posts in the google and stack overflow, but with no luck, none of them can solve it, I've try add the channelurl, rearrange the javascript...etc, but no luck, please help, thanks in advance.
This is logged as a bug in Facebook's bug tracker now. Best way to get it fixed is to vote for it!
http://bugs.developers.facebook.net/show_bug.cgi?id=16176
Facebook fixed a bug we have been waiting on in their JS SDK this week so we were planning on switching from the old JS SDK to the new but during final testing came across this as well. Looks like window location is being reported back.
Anyone know if this is new and what exactly it is used for? Can it be disabled? Wonder what this would do to performance across different environments.
This starts happening after FB.init in window.fbAsyncInit is called with de JS SDK. It is passing height and width of the client and scroll as parameters with type canvasPage.update. It might, but I do not know, have something to do with a bug earlier this year when apps in iframes weren't resizing, something like a work around.
I just noticed this today as well, and initially thought it was due to FB.Canvas.setAutoResize() being called surreptitiously, but nope, it seems like scroll has been bound to this update.

Multiple "Like Button"s on a page

I have a page with 20 articles, and for each article, I have a Facebook Like Button, implemented using the tag.
Because of this, my site is greatly slowed down as Firefox makes a query in the background for each of the like button.
Is there anything I can do to reduce this load?
In my experience, all the extra IFRAMES are actually faster than using the JavaScript SDK, even though the Like icons are supposed to load asynchonously. I have a page with about 18 like buttons on it, and at least the IFRAME approach doesn't result in a perceived slowdown for users like the JS version does - the only downside is that the Like buttons "pop" into the page a little late in IFRAMES.
I assume you're using iframe to display your like buttons. Performance is the downside of using iframes. If you've got 20 iframes, then it's equivalent to loading 20 web pages (with 20 independent http requests). As browsers have connection limits per domain, it can take a while for this many iframes to load. This is especially true in older browsers, where connection limit is only 2 per domain, which means that only 2 iframes can load at a time. iframe can also have the negative side effect of blocking other downloads, which makes the problem even worse. You can read all about iframe performance problems here:
http://www.stevesouders.com/blog/2009/06/03/using-iframes-sparingly/
If possible, you may want to consider using xfbml like button instead of iframe. Unfortunately, this means that you'll need to load Facebook's JavaScript SDK, but with 20 like buttons, you should see an overall performance boost.
As an alternative, if you're not keen on the idea of xfbml, you could try a service like OpenLike: http://openlike.org/
From their docs:
A widget is created by first loading the OpenLike javascript and then calling OPENLIKE.Widget(). Multiple widgets can be embedded in the same page, each with different options.
I ended up going with something similar to this solution Lots of XFBML Facebook Like buttons are slow? with JQuery Sonar. It seems to do the trick for me. I'd prefer a single call that loads all the buttons but it's outside of my control.
If I had more time what I'd do is use the facebook API to get the count and make my own buttons (perhaps load the real button on hover if i wanted their functionality but iirc you can just call the "share" function directly). I don't currently have time to massage facebook that much so this is a sorta makeshift hack that I don't think has too many downsides and it seems to be used by a number of different sites.