diff options
author | Moonchild <mcwerewolf@gmail.com> | 2018-02-04 19:51:02 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-04 19:51:02 +0100 |
commit | 34cdbd1366224f040136c3a747709ae5e92f5956 (patch) | |
tree | 6fe19ea1a062a5f0e285e2298a92bf642b233594 /devtools/server/actors/inspector.js | |
parent | c0dfa1fdaa3f1135504d81507f61b3fd8dfd25e0 (diff) | |
parent | f34094bae31e216228d5c2da2f2461d03df38302 (diff) | |
download | UXP-34cdbd1366224f040136c3a747709ae5e92f5956.tar UXP-34cdbd1366224f040136c3a747709ae5e92f5956.tar.gz UXP-34cdbd1366224f040136c3a747709ae5e92f5956.tar.lz UXP-34cdbd1366224f040136c3a747709ae5e92f5956.tar.xz UXP-34cdbd1366224f040136c3a747709ae5e92f5956.zip |
Merge pull request #6 from janekptacijarabaci/devtools_inspector_copyFullCSSPath_1
Add a "copy full CSS path" option to the inspector's menu
Diffstat (limited to 'devtools/server/actors/inspector.js')
-rw-r--r-- | devtools/server/actors/inspector.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/devtools/server/actors/inspector.js b/devtools/server/actors/inspector.js index 20a227a40..883809b6c 100644 --- a/devtools/server/actors/inspector.js +++ b/devtools/server/actors/inspector.js @@ -626,6 +626,18 @@ var NodeActor = exports.NodeActor = protocol.ActorClassWithSpec(nodeSpec, { }, /** + * Get the full CSS path for this node. + * + * @return {String} A CSS selector with a part for the node and each of its ancestors. + */ + getCssPath: function () { + if (Cu.isDeadWrapper(this.rawNode)) { + return ""; + } + return CssLogic.getCssPath(this.rawNode); + }, + + /** * Scroll the selected node into view. */ scrollIntoView: function () { |