Debugging AngularJS web app in Firefox extensions - firefox

I have created a Firefox extension that loads an iframe. That iframe loads a web application built using AngularJS. Is there anyway to inspect what is going on? The application loads but I have 2 input boxes that I am unable to type in.
I've developed the extension in both XUL and using the Add-On SDK and both of them don't allow me to interact with the input box. I've further noticed that when I remove the ng-model attributes, interaction works. It seems like data binding is an issue.
Any ideas?
Thanks

Without seeing the code, it's hard to say what's going wrong. If I were running into this problem (and I've run into similar ones), I generally fall back to editing the Angular source, and adding dump (or console.log) statements to try and trace what's going on. It's pretty terrible, but it usually gets the job done.
Good luck!

This question is kinda old by now, but as a reference for people coming here from a web search:
you might want to look at this SO question that lists some things that can go wrong with AngularJS inside XUL extensions, together with some solutions.

Related

Profiling Webworkers in Firefox

I am trying to profile a Javascript app with Firefox Quantum. The part that I am most interested in runs inside webworkers. I am not sure if I am doing everything correctly, but I cannot find a way to get any useful data with the built in profiler. All I can see is this:
Is there a hidden feature that can help me look inside the webworker?
For anyone else finding this in the future: https://profiler.firefox.com/ is able to profile Web Workers.
You need to open the Resources drop-down and choose Thread: DOM Worker.
After further looking into this I came to the conclusion that Firefox does not support runtime analysis for web workers at the moment. I will have stick with Chrome for profiling our app.

Is Adobe Air/Flash the easiest framework for advanced GUI development?

Excuse a non-developer being forced to develop applications instead of administrating networks like I'm used to. This is a horrible post in many ways.
I'm developing an application which has reached the point of needing a GUI. However, I haven't done any GUI development ever before, so I feel the need to ask for help on this.
The application is your standard data collecting/management app, with all common widgets and stuff that every application is using. The problem is that I need the application to be able to display websites using an external browser of some sort, to pass a captcha on the site the application works against. The website guys haven't given me permission to circumvent the captcha in any way.
I know of GTK, QT, Tcl/Tk etc. None of these frameworks have struck me as easy to use. To be honest, I'd like to design the interface using drag-and-drop like I used to do in VB6 when I was a kid, although I get chills thinking about writing this thing in Basic.
I was thinking about Adobe Air, and to design the application in Flash/ActionScript. From what I've learned about Air, I should be able to do everything I want to do. And I do believe it has built in sqlite, right? Would it be considered more "simple" to develop the actual GUI using Flash than using one of the traditional frameworks? What pitfalls am I facing?
A few guidelines:
It only needs to run on Windows
I need to be able to work against a database. Currently using SQLite3.
Some sort of browser integration is crucial. A browser window of some sort needs to open up inside my interface, be directed by the application, and the application needs to be able to read some data from the site that is being used.
Any help with this would be great. This is a clear case where I have to rely on the experience of others to complete the project at all. I'm happy to provide more information if you need that to make a suggestion.
You can always try Titanium Framework, it was aquired by Appcelerator nor so much ago. http://www.appcelerator.com/
It actually puts a webkit browser in a window, so if you can design HTML and CSS you can use this framework.

JavaFX replace AJAX?

Can JavaFX replace what AJAX do? i went through a couple of articles like this http://www.ajaxlines.com/ajax/stuff/article/ajax_vs_javafx.php. But I am still confused. anyone help??
I don't think this will happen, certainly not at the moment. JavaFX depends on java, there's very little support cross-platform (windows mobile does work but it's very limited). There was talk about set top boxes coming out to run javafx but it doesn't seem to have taken off :\ It's a real shame, in many ways I really like JavaFX. It's a shame they won't open the source. Also for deployment there is a dependancy on a sun server to get some jars (not possible to host on your own server), so when it goes down (and it is a when) then everyones apps stop working!
Javascript keeps my vote unfortunately.
Technically, yes JavaFX can do everything that AJAX can do and more - on a supported platform. Unfortunately JavaFX isn't supported on most smartphones so you won't get the same reach as AJAX. You also need a browser plugin which you don't need for AJAX.
But if these limitations aren't a problem, then I think you will have less misery using JavaFX instead of AJAX.

Which language offers the most portability in terms of tabbing a webpage menu?

This may be a subjective question, I am new here so keep that in mind...
I have searched and searched and been unable to determine what the best way is the do a tabbed menu for a webpage. The webserver is Unix based, so anything .NET is out of the question. It seems that AJAX/javascript is the 'nicest' way to go, but I've heard there are issues with certain browsers (especially IE). Is this true?
I'd rather have the flexibility offered by javascript than going for purely CSS based tabs, and have the menu tabs function correctly in all/the_most browsers.
Thanks in advance for helping!
Welcome to SO. To answer your question, I would recommend you take a look at jQuery's tab control API:
http://jqueryui.com/demos/tabs/
The advantage of doing this on the client side is that you won't have to worry about what the backend platform supports, only browser compatibility.
If you're wanting to use AJAX it depends on whether you're loading dynamic content or not. Unfortunately a lot of things can be a tad funky in IE.
You should be able to use JQuery for creating tabs, check out JQuery UI for examples or search for other plugins.
This is basically using JS and you could have a fall back CSS version incase browser doesn't support Javascript. Using JQuery also is independent of you using any other language (PHP, ASP, ASP.NET etc).

How can I check my AJAX for browser capable?

I always have to check each and every browser to see if my website would work. Is there a website where I can check it with?
Update:
I don't really want just screenshots (which what browsershots do), I want to actually test the posting of my script.
You want a web site to check your web site for javascript compatibility? How would you expect it to know how to exercise your interface to trigger the proper interactions? Or are you thinking of it doing some sort of static code analysis? I think you are better off coding against a framework that has solved most of the browser-dependent idiosyncrasies and using it to check for browser capabilities before you use them. jQuery, MooTools, Prototype/Scriptaculous, etc. go a long way in solving these problems for javascript.
Note that you still need to worry about rendering your site, but you already have several answers for how to go about doing that based on web sites. Personally, I just maintain IE/Safari/FF/Opera/Chrome on my workstation and do significant checking in IE/FF and basic checking in Safari/Opera/Chrome.
Even when there exist websites that allow you to see a static snapshot of your site in several browsers, you should really test your page on them yourself, because there can be subtle, and not so subtle, bugs and differences that are only apparent when interacting with the webpage.
You can cover yourself quite a lot by testing in
A Gecko engine browser (Firefox)
A Webkit engine browser (Chrome, Safari, Konqueror)
Opera
AND IE6+
John Resig recommends checking the Yahoo graded browser support documentation.
If you write unit tests for your javascript, you could use testswarm http://testswarm.com
There are multiple options:
http://ipinfo.info/netrenderer/
These site will let you run multiple browsers and version without installing. You only need to install a plugin
http://spoon.net/browsers/
There are plenty of sites, just Google/Bing for browser compatibility check.
http://browsershots.org/ is a good one.
Although most of them just take a snapshot of the site, you might have to do the manual check for things like menus and dynamic content.
BrowserShots might do what you want if you can tell by rendering a particular URL whether or not things will work as expected.
In light of your update, you could still use BrowserShots by creating a page which tests each of your scripts and renders 'pass' or 'fail' as its content depending on whether they work or not.
Failing that, Multiple IE is quite useful for running various versions of IE on one PC which can otherwise be problematic.

Resources