Skip to content

Commit

Permalink
getInitialvalue was added to attributeEditor object. see issue5755
Browse files Browse the repository at this point in the history
  • Loading branch information
farshidbeheshti committed Aug 6, 2012
1 parent 9e38225 commit b25e8d2
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions extension/content/firebug/html/htmlPanel.js
Expand Up @@ -2262,6 +2262,19 @@ AttributeEditor.prototype = domplate(Firebug.InlineEditor.prototype,
var emptyAttr = {name: "", value: ""};
var sibling = insertWhere == "before" ? target.previousSibling : target;
return AttrTag.insertAfter({attr: emptyAttr}, sibling);
},

getInitialValue: function(target, value)
{
if(value == "")
return value;
var element = Firebug.getRepObject(target);
if(element && element instanceof window.Element)
{
var attributeName = Dom.getPreviousByClass(target, "nodeName").textContent;
return element.getAttribute(attributeName);
}
return value;
}
});

Expand Down

0 comments on commit b25e8d2

Please sign in to comment.