0

Does anyone have any tricks on how to use the badged buttons feature of addon-sdk from non-sdk addons? https://developer.mozilla.org/en-US/Add-ons/SDK/Low-Level_APIs/ui_button_action#Badged_buttons

If no tricks my thinking was to use maybe override xbl and/or override display='xul:button' from techniques listed here: To anonymous element add pseudo element and cursor style and event listeners

Community
  • 1
  • 1
Noitidart
  • 35,443
  • 37
  • 154
  • 323
  • 1
    I stumbled on a comment (in bugzilla I think) which indicated that Mozilla are planning to allow an easy way to import any SDK feature into a non-SDK addon. Afraid I can't remember the timing of their plan or exactly where I read it but thought you might be interested even if it's not a solution right now. – Luckyrat May 19 '15 at 22:01

1 Answers1

1

You can always look at the SDK source code. Here's the pertinent line

node.setAttribute('class', 'toolbarbutton-1 chromeclass-toolbar-additional badged-button');
willlma
  • 7,353
  • 2
  • 30
  • 45
  • Thanks that's what I did. I'm in the process of looking into the rules of that styling/binding. Because that class probably didn't exist for Firefox 29. I think badging came out later right? – Noitidart May 27 '15 at 19:36
  • 1
    [FF 36, unfortunately](https://developer.mozilla.org/en-US/Add-ons/SDK/Low-Level_APIs/ui_button_action#Badged_buttons) – willlma May 27 '15 at 19:52
  • Thanks that helps a lot! That validates my effort to make my own bindings (well just steal them from FF36+) – Noitidart May 27 '15 at 19:53