Closed
Bug 413605
Opened 17 years ago
Closed 17 years ago
allow to use JS for the selected accessible in the accessibleTree view
Categories
(Other Applications :: DOM Inspector, defect)
Other Applications
DOM Inspector
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: surkov, Assigned: surkov)
Details
(Keywords: late-l10n)
Attachments
(1 file, 2 obsolete files)
21.73 KB,
patch
|
mconnor
:
approval1.9b3-
damons
:
approval1.9+
|
Details | Diff | Splinter Review |
allow to use JS for the selected accessible in the accessibleTree view
Attachment #298671 -
Flags: superreview?(neil)
Attachment #298671 -
Flags: review?(sdwilsh)
Assignee | ||
Comment 1•17 years ago
|
||
Attachment #298671 -
Attachment is obsolete: true
Attachment #298672 -
Flags: superreview?(neil)
Attachment #298672 -
Flags: review?(sdwilsh)
Attachment #298671 -
Flags: superreview?(neil)
Attachment #298671 -
Flags: review?(sdwilsh)
Comment 2•17 years ago
|
||
Is there a particular reason you're not reusing the existing JS evaluator?
Assignee | ||
Comment 3•17 years ago
|
||
(In reply to comment #2)
> Is there a particular reason you're not reusing the existing JS evaluator?
>
it has a bit different logic. JS evaluator evaluates JS expression and shows the result in new window. Here I need more than just expression. I need to evaluate JS script (several expressions). Therefore proposed evalJSDialog uses multiline textbox to type script and has output window to write results.
Comment 4•17 years ago
|
||
Comment on attachment 298672 [details] [diff] [review]
patch2
Well, I still think I'd prefer a unified evaluator, and I also think it might be helpful to output the result by default (unless it is undefined).
>+ return node.accessible;s
Stray s?
>+function execute()
>+{
>+ if (!gAcc)
>+ return;
How can this be true?
>+ try {
>+ var f = Function("accessible", expr);
>+ var result = f(gAcc);
>+
>+ } catch (ex) {
>+ output(ex);
>+ }
Funky indentation.
>Index: extensions/inspector/resources/locale/jar.mn
Don't forget to update ALL_LOCALES.
>+ <!ENTITY btnEvaluateJS.label "Evaluate">
>+ <!ENTITY btnEvaluateJS.accesskey "e">
>+
>+ <!ENTITY txtInputArea.label "Input Area (use 'accessible' variable to operate with the selected accessible and 'output' function to write into 'Output Area' window): ">
>+ <!ENTITY txtInputArea.accesskey "i">
>+ <!ENTITY txtOutputArea.label "Output Area: ">
>+ <!ENTITY txtOutputArea.accesskey "o">
All accesskeys should be uppercase to match their labels.
Attachment #298672 -
Flags: superreview?(neil) → superreview+
Comment 5•17 years ago
|
||
Comment on attachment 298672 [details] [diff] [review]
patch2
s/application\/x-javascript/application\/javascript/g
>+/**
>+ * Return accessible of the tree node pointed by the given
>+ * row index.
>+ *
>+ * @param aRow - row index.
nit:
@param aRow
The row index to get the accessible from.
@returns ...
locales break the build system - so remove everything but english from the Makefile.
r=sdwilsh
Attachment #298672 -
Flags: review?(sdwilsh) → review+
Assignee | ||
Comment 6•17 years ago
|
||
(In reply to comment #4)
> (From update of attachment 298672 [details] [diff] [review])
> Well, I still think I'd prefer a unified evaluator, and I also think it might
> be helpful to output the result by default (unless it is undefined).
I would like to have the unique evaluator though I'm not sure how the combined one should looks. I'll file following up bug for this.
Assignee | ||
Comment 7•17 years ago
|
||
with Neil's, Shawn's comments
Attachment #298672 -
Attachment is obsolete: true
Attachment #299965 -
Flags: approval1.9?
Assignee | ||
Comment 8•17 years ago
|
||
(In reply to comment #4)
> >+function execute()
> >+{
> >+ if (!gAcc)
> >+ return;
> How can this be true?
it can't be true actually until someone another open the dialog and forget to pass argument. It's just additional protection. But if you would like to remove it then I will.
Comment 9•17 years ago
|
||
Comment on attachment 299965 [details] [diff] [review]
patch3
a1.9+=damons
Attachment #299965 -
Flags: approval1.9? → approval1.9+
Assignee | ||
Updated•17 years ago
|
Attachment #299965 -
Flags: approval1.9b3?
Comment 10•17 years ago
|
||
Comment on attachment 299965 [details] [diff] [review]
patch3
not necessary for b3, can land when we reopen
Attachment #299965 -
Flags: approval1.9b3? → approval1.9b3-
Assignee | ||
Comment 11•17 years ago
|
||
checked in
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 12•17 years ago
|
||
I filed bug 415879 to get unified JS evaluator.
You need to log in
before you can comment on or make changes to this bug.
Description
•