Last Comment Bug 396056 - DOM changes to existing <link> elements don't trigger RSS autodiscovery menu updates
: DOM changes to existing <link> elements don't trigger RSS autodiscovery menu ...
Status: NEW
:
Product: Firefox
Classification: Client Software
Component: RSS Discovery and Preview (show other bugs)
: unspecified
: x86 Windows XP
: -- normal with 4 votes (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
:
: Marco Bonardo [::mak]
Mentors:
: 457409 (view as bug list)
Depends on: 380639
Blocks:
  Show dependency treegraph
 
Reported: 2007-09-13 10:38 PDT by Aubrey Alexander
Modified: 2009-01-08 13:19 PST (History)
5 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments

Description Aubrey Alexander 2007-09-13 10:38:53 PDT
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6

If you use DOM to dynamically add an RSS link, it does not show up as the new source of the orange RSS icon on the top.  This makes it so dynamic AJAX applications can not offer live RSS feeds of results that can be changed on the fly without page reloading.

Autodiscovery feeds off the DOMLinkAdded event which is
fired when a new link element is added to the DOM, either from the
original parse of the page or from later scripting, so you can create
a new link element with the appropriate attributes, add it to the
document, and have it added to the discovered feeds

Do we need a listener for the companion event,
DOMLinkRemoved, which would remove the previously discovered link?

Reproducible: Always

Steps to Reproduce:
1. Add a link to a URL
2. Use javascript to remove previous, add new
3. Orange RSS icon still points to the old rss feed


Expected Results:  
Orange rss icon should point to the new results
Comment 1 Aubrey Alexander 2007-09-21 08:33:21 PDT
What I am trying to do is make an advanced query of a set of data with AJAX-based sliders.  The resultset on the bottom is updated dynamically whenever the sliders are moved.  I'd like a way to use javascript to update the page so the RSS icon can reflect the current search results.   

This kind of interactive functionality is being used more and more as web 2.0 and AJAX are moving to the mainstream.  I think that this is an important step in marrying AJAX with RSS and open the gates to a lot of new, exciting web applications.
Comment 2 Aubrey Alexander 2007-09-27 10:37:13 PDT
Does anybody have any suggestions on how I could make this work?
Comment 3 Nickolay_Ponomarev 2007-10-03 06:24:07 PDT
bug 380639 seems related.
Comment 4 Aubrey Alexander 2007-11-09 11:34:02 PST
Yes, bug 380639 seems to have an attached code with a potential patch for this issue.
Comment 5 Phil Ringnalda (:philor) 2008-09-27 18:57:51 PDT
*** Bug 457409 has been marked as a duplicate of this bug. ***
Comment 6 :Gavin Sharp [email: gavin@gavinsharp.com] 2009-01-08 12:39:00 PST
There's no easy way to fix this without mutation event listeners, which are expensive perf-wise. We could alternatively just rebuild the menu each time it's opened (which would also fix bug 380639), but that might be too slow.
Comment 7 Phil Ringnalda (:philor) 2009-01-08 13:19:07 PST
Well, and whether it's a menubutton or a button depends on the (current) state of the world, and we have a healthy dose of bugs on the way we currently don't show that, so to not block off fixing them the feed list would need to be rebuilt for the tooltip's popupshowing and for click, not just the menu's popupshowing.

Bleah, and it would still block half of showing, since the two things people want are tooltips that say "Subscribe to this page's feed" or "See a list of this page's feeds" and to have a dropmarker when there's more than one. But you might have multiple feeds onload, so we put a dropmarker on the icon, and then all but one is removed, so when you click the icon to see the menu, we grovel through the DOM and decide to remove the dropmarker and load a feed instead of showing the menu you expect.

Note You need to log in before you can comment on or make changes to this bug.