Closed Bug 1148075 Opened 9 years ago Closed 9 years ago

dynamically add commands per-component

Categories

(DevTools :: Debugger, defect)

x86
macOS
defect
Not set
normal

Tracking

(firefox40 fixed)

RESOLVED FIXED
Firefox 40
Tracking Status
firefox40 --- fixed

People

(Reporter: jlong, Assigned: jlong)

Details

Attachments

(1 file, 1 obsolete file)

This is prep work for modularizing the frontend a bit. I want to reduce globals and right now the <command> elements add an event handler as a string in the DOM, which requires global access. Let's allow each component to dynamically add commands.
Attached patch 1148075.patch (obsolete) — Splinter Review
Can you take a look especially how I added the utils file to jar.mn? I have no experience with that. This worked though.
Attachment #8584043 - Flags: review?(ejpbruel)
Hi James, I don't think I'm the best person to review this patch. I have limited experience with XUL, and I have no experience with jar.mn either. I think Victor would be a good candidate to take a look at this.

Victor, could you do me a favor and take a look at this patch for me?
Flags: needinfo?(vporof)
Comment on attachment 8584043 [details] [diff] [review]
1148075.patch

Review of attachment 8584043 [details] [diff] [review]:
-----------------------------------------------------------------

looks good

::: browser/devtools/debugger/utils.js
@@ +1,1 @@
> +

License boilerplate.

use strict.

@@ +14,5 @@
> +    Object.keys(commands).forEach(name => {
> +      let node = document.createElement('command');
> +      node.id = name;
> +      // XXX bug 371900: the command element must have an oncommand
> +      // attribute as a string set by `setAttribute` for keys to use it

ugh
Attachment #8584043 - Flags: feedback+
Attached patch 1148075.patchSplinter Review
rebased and comments addressed
Attachment #8584043 - Attachment is obsolete: true
Attachment #8584043 - Flags: review?(ejpbruel)
Flags: needinfo?(vporof)
That intermittent is a known failure, and not related to this patch.
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/2c7a6e149631
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 40
Assignee: nobody → jlong
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: