Last Comment Bug 361026 - Enable script execution in Microsummaries.
: Enable script execution in Microsummaries.
Status: RESOLVED WONTFIX
[microsummaries-feature-removal]
:
Product: Firefox Graveyard
Classification: Graveyard
Component: Microsummaries (show other bugs)
: unspecified
: x86 Windows XP
: -- normal
: ---
Assigned To: Nobody; OK to take it and work on it
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-11-16 23:23 PST by Doug Turner (:dougt)
Modified: 2016-02-12 06:59 PST (History)
5 users (show)
See Also:
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
strawman patch (3.94 KB, patch)
2006-11-16 23:42 PST, Doug Turner (:dougt)
no flags Details | Diff | Splinter Review

Description Doug Turner (:dougt) 2006-11-16 23:23:59 PST
I want to be able to perform actions during the update of a Microsummary.  This would enable microsummaries to do everything from use a notification system to modify the UI of the microsummary to indicate change.
Comment 1 Doug Turner (:dougt) 2006-11-16 23:31:06 PST
I am proposing that we add a new optional element to the microsummary xml format:

<handlers>
<![CDATA[
...
]]>
</handlers>

In the CDATA section can exist optional function callbacks that happen at various points in the processing of the microsummary.  One that I have identified quickly is during the update of the microsummary which happens periodically.  I have defined that to be:


    function onMicrosummaryUpdate()
    {       
    }

When the microsummary is updated, we will check for the existence of this function, and if it does exist, we call it.  It might be that we pass paramaters to it at some point, or add new objects or functions into context in which it runs.  One such function which I have added is:

    microsummaryLog( string );

Which will log messages to the console service.

The context of which it runs will be a non-privileged context (sandbox).
Comment 2 Doug Turner (:dougt) 2006-11-16 23:42:58 PST
Created attachment 245823 [details] [diff] [review]
strawman patch

this is sorta of not completely baked.  I am posting it now so that (a) I don't forget and lose these changes, (b) I can get jst to help look at the security of the sandboxing I am doing -- specificaly with repect to which principal I am using, and (c) to get some early feedback from myk on direction.

A few notes that might be interesting:

1) I am not sure if i am calling  this._sandbox.onMicrosummaryUpdate(); in the right place.  i seams that I am doing alot of waiting around before update is called.

2) i short circuited _updateInterval() and LOG()

3) I am wondering if there is an easier way to get the CDATA from the handler element -- a while look on the children checking for type seams pretty dumb.

4) jst -- Components.utils.Sandbox("")... what should the string be?  Also, why is it failing?  Is it because the URI that I am passing hasn't been loaded yet?  Maybe the empty string is the right thing to do?
Comment 3 M.J.G. 2006-12-04 06:07:22 PST
Regarding UI modification on microsummary update:
At least something can be done using CSS, see e.g.

http://aboutconfig.mozdev.org/stuff.html

which implements tinderstatus using a microsummary: colours and icons of the microsummary depend on the status of the microsummary text.
Your suggestion is much more powerful, of course - until CSS allows embedding of JS ;)

Cheers,
Michael
Comment 4 Doug Turner (:dougt) 2007-10-08 16:13:36 PDT
mass reassigning to nobody.
Comment 5 Marco Bonardo [::mak] 2011-05-02 05:30:07 PDT
- BUGSPAM -
Wontfixing all Microsummaries bugs, since the feature has been removed from the core product and previous versions won't get further fixes for it.
If interested in supporting Microsummaries in your add-on, you're free to use our old microsummaries code and to search all previously open bugs by looking for [microsummaries-feature-removal] in the status whiteboard field.

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