Ticket #5519 (closed bug: invalid)
Problem using data() in GreaseMonkey script
| Reported by: | kipthegreat | Owned by: | |
|---|---|---|---|
| Priority: | minor | Milestone: | 1.4 |
| Component: | data | Version: | 1.3.2 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
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
Change History
Changed 4 years ago by kipthegreat
-
attachment
gmscript.js
added
Changed 4 years ago by kipthegreat
-
attachment
gmtarget.html
added
Page that GreaseMonkey script should be enabled for
Changed 4 years ago by kipthegreat
-
attachment
local-only.html
added
Page using only locally-defined javascript, works OK.
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

GreaseMonkey script