Firefox add-on builder and Jquery Mobile - firefox

I am trying everything under my power here to insert jquerymobile.1.0.1 into an extension I have build for firefox.
I can install, link to any other script and everything seems to work just fine, but have had an assortment of errors getting jquerymobile to work.
I've tried uploading through the add-on builder
I've tried remotely linking the file
I've tried copying and pasting the file into other code.. nothing works.
I've coded this extension for safari, chrome and opera without issue, but Firefox chokes the second I link to/include jquerymobile in my code returning this error:
Timestamp: 12-04-27 12:10:33 PM
Error: uncaught exception: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMHistory.replaceState]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: resource://jid0-d4zlaxz3cfuahkcdoecsmya637m-at-jetpack/idesireit/data/js/jquery.mobile-1.0.1.min.js :: :: line 72" data: no]
and also an error about "unallowed unicode" which I didn't get the chance to copy or paste, but I haven't seen that one in a few saves...
I've read that the above error can be caused by cross domain functions, but all my cross domain functions are in another js file, and they are all working just fine ( judging by those I can navigate to with jquerymobile acting as it is right now )
I'm a novice - if my error is based on my stupidity, please go lightly :O

I went ahead and created an all new extension,
included nothing but the popup, and in that pop up, called jquery and jquery.mobile.
I got this error instantly again.
I'm just going to go ahead and use the alternative UI I'm using on the dashboard widget, I've wasted too much time on this.

The bug is in the addonsdk, not in JQ Mobile. Any attempt to access or manipulate the window.history object in a panel will raise this error.

Related

Website Vitals: Oops! Something went wrong

Hello I am testing my website and I have an score of about 80-90/100 if I look it with Chrome Lighthouse Extension. But in web.dev/measure and https://pagespeed.web.dev
The report returns an error. There is no error in console and there is no indication on what error is. I opened network inspector to see what web.dev was returning and this is what it said:
Lighthouse returned error: NO_FCP. The page did not paint any content. Please ensure you keep the browser window in the foreground during the load and try again. (NO_FCP)
But this is not true, the website loads fast, and works if I check it with the CLI or the Chrome Extension.
Any ideas on how can I debug this to find what is causing this error?
Thanks

Web application written with Processing, using processing.js: how to debug?

I'm a newby in HTML, while I've some skill with Processing language.
I'm writing an application in Processing which I want to visualise in a local webpage.
I've a basic index.html, which upload my sketch and the file processing.js.
It works.
My problem is that sometimes, an application which runs with no proiblem using the Processing IDE, does not run in the webpage. I assume there are still some bugs in the porting from Processing to JavaScript.
What I would like to know is: is there some way to debug the webpage I try to visualise?
Just to seek "where" the webpage remains stuck! In this way I could bypass the problem!
For now, I'm using Firefox for html visualisation.
Thanks a lot, Valerio
Ops solved! I downloaded FireBug, an add-on for Firefox implementing a debugger.
Then I launched the debugger. It showed me immediately the error.
For curious people:
I declared an ArrayList called "foo_list", containing object "foo":
ArrayList<foo>foo_list
The above line does not produce any error in the Processing IDE.
However processing.js complains with it, the debugger displayng
the following message:
ReferenceError: ArrayListfoo_list" is not defined
The solution is to insert a blank space:
ArrayList<foo> foo_list;
This works! Maybe the error given to the parser
from Processing to JavaScript!
Bye!

Firefox Annotator SDK tutorial, cannot get the annotator button to work

Link to the tutorial
I am trying to get to grips with Firefox SDK development using the tutorials on MDN. The annotator tutorials seem very good but CFX Run fails on the first control stage.
The tutorial uses the widget API that was deprecated in Firefox 29 but I tried downgrading Firefox 28 and the tutorial still doesn't work even when I am copy and pasting the code directly from the page code. When I come to the end of the Implementing the widget page I only get the following message when trying to click the widget icon (the first time, then nothing hapens).
(C:\Users\myname\Firefoxplayground\addon-sdk-1.16) C:\Users\myname\Firefoxplay
ground\pageMod>cfx run
Using binary at 'C:\Program Files (x86)\Mozilla Firefox\firefox.exe'.
Using profile at 'c:\users\sigvard\appdata\local\temp\tmpg3kq0j.mozrunner'.
console.error: pagemod:
Error opening input stream (invalid filename?)
JavaScript strict warning: chrome://browser/content/urlbarBindings.xml, line 666
: reference to undefined property this._value
JavaScript error: chrome://browser/content/urlbarBindings.xml, line 648: aUrl is
undefined
The issue was caused by a bug in the Firefox SDK.
Updating to Firefox SDK 1.16 and initializing a new folder for the project solved it.

javascript not throwing ReferenceError when using events

UPDATE: This issue cannot be reproduced in Chromium. It seems to be specific to Firefox (both developer toolbar and Firebug).
I have tried disabling all add-ons but still can't get the errors to fire. RUnning Firefox 24.1.1 (mozilla tells me I am using the latest version. This behaviour has been consistent across updates.
I am really new to using events in javascript so hopefully this is an easy fix. But I couldn't sift through all the "error handling" articles when I search for "javascript custom event handler no errors"
When I execute the following code with a syntax error ("consle.log"; no "o"), it fails without throwing any syntax errors
function greetHandler(){
consle.log("Hey bro");
}
document.addEventListener("greet", greetHandler,false);
document.dispatchEvent(new Event('greet'));
However, if I were to use run only:
consle.log("Hey bro");
The console would loudly complain:
ReferenceError: consle is not defined
How can I get that ReferenceError throwing when I am using eventListeners to make my debugging life easier?

kendoui getting started does not work - js has invalid token

I am looking at KendoUI for a js app that will run in house. I download the kendoui (either opensource or the latest from them) and follow these very simple directions:
http://docs.kendoui.com/getting-started/introduction
Doing exactly as they suggest results in a js error of (same js error if I run the files through a local apache server or directly as file:// in Google Chrome).
Uncaught SyntaxError: Invalid regular expression: missing /server/js/kendo.web.min.js:10
Uncaught TypeError: Object [object Object] has no method 'kendoDatePicker'
What gives?
The js files are found and loading. But it chrome complains about
GET http://0.0.0.0:7773/server/js/jquery.min.map 404 (Not Found)
Perhaps these instructions are old?
Update:
It appears that the js files in the Kendo downloads are corrupt today. It works if I either link directly to the Kendo CDN, or if I download web.ui from github. Its not my zip expansion software (OS X 10.8), as the query 1.9.1 included in the kendo download works perfectly.
This is due to a known issue. Long story short you need to download the bits again and use the updated JavaScript files.

Resources