Skip to main content

Bug Tracker

Side navigation

#5519 closed bug (invalid)

Opened November 16, 2009 08:52PM UTC

Closed November 16, 2009 11:39PM UTC

Problem using data() in GreaseMonkey script

Reported by: kipthegreat Owned by:
Priority: minor Milestone: 1.4
Component: data Version: 1.3.2
Keywords: Cc:
Blocked by: Blocking:
Description

I'm not 100% sure if this is a problem with jQuery or GreaseMonkey. When I am using jQuery's data() function from a GreaseMonkey script, it does not find the data. (GreaseMonkey is a Firefox extension that allows the user to run arbitrary Javascript when a given page is loaded.)

I've attached a greasemonkey script (gmscript.js), and an HTML page to test the problem on (gmtarget.html). I've also attached a local-only HTML file, which has identical jQuery code defined in the HTML file (local-only.html), so no GreaseMonkey script is involved.

In both cases, I store 'abc' on a text area, then add a listener to the text area that will alert() with the data stored on that text area when the user hits spacebar. It works as expected in the local-only version, but not in the GreaseMonkey script.

Like I said, this could be a GreaseMonkey problem, but I don't know for sure.

Attachments (3)
  • gmscript.js (0.6 KB) - added by kipthegreat November 16, 2009 08:52PM UTC.

    GreaseMonkey script

  • gmtarget.html (0.2 KB) - added by kipthegreat November 16, 2009 08:52PM UTC.

    Page that GreaseMonkey script should be enabled for

  • local-only.html (0.5 KB) - added by kipthegreat November 16, 2009 08:53PM UTC.

    Page using only locally-defined javascript, works OK.

Change History (1)

Changed November 16, 2009 11:39PM UTC by dmethvin comment:1

resolution: → invalid
status: newclosed

If you can narrow it down to a jQuery problem, reopen this with a clear description of the bug. Maybe someone in a jQuery or Greasemonkey forum could help isolate it.