domNode viewer assumes some non-element nodes are element nodes

RESOLVED FIXED

Status

Other Applications
DOM Inspector
RESOLVED FIXED
7 years ago
7 years ago

People

(Reporter: crussell, Assigned: crussell)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

Created attachment 482288 [details] [diff] [review]
hide the tree for and disable Insert for non-elements [Checkin: comment 5]

The attribute tree is only relevant if the node is an element.  Similarly cmdEditInsert should only be enabled if the node is an element.
Attachment #482288 - Flags: review?(neil)
crussell: Would it be worth preserving cmdEditInsert support for document fragment nodes?  (Granted, it's not easy to get one into DOM Inspector...)
(In reply to comment #1)
> crussell: Would it be worth preserving cmdEditInsert support for document
> fragment nodes?  (Granted, it's not easy to get one into DOM Inspector...)

It's not that hard to get one; we "export" inspectObject in hooks.js for anybody to use.  That'll give you an object viewer inspecting whatever you pass in.

But document fragments can't have attributes anyway.
Oh, sorry.  I thought cmdEditInsert was about inserting child nodes, not attributes.

Comment 4

7 years ago
Comment on attachment 482288 [details] [diff] [review]
hide the tree for and disable Insert for non-elements [Checkin: comment 5]

I figured out when Insert used to be erroneously enabled.
Attachment #482288 - Flags: review?(neil) → review+
Comment on attachment 482288 [details] [diff] [review]
hide the tree for and disable Insert for non-elements [Checkin: comment 5]

Pushed: http://hg.mozilla.org/dom-inspector/rev/911d1a632765
Attachment #482288 - Attachment description: hide the tree for and disable Insert for non-elements → hide the tree for and disable Insert for non-elements [Checkin: comment 5]
Blocks: 592530
Status: ASSIGNED → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.