[Webkit-unassigned] [Bug 21108] Impossible to add an attribute to a node without attributes

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jul 23 10:33:36 PDT 2009


https://bugs.webkit.org/show_bug.cgi?id=21108


Timothy Hatcher <timothy at hatcher.name> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #33339|review?                     |review-
               Flag|                            |




--- Comment #6 from Timothy Hatcher <timothy at hatcher.name>  2009-07-23 10:33:35 PDT ---
(From update of attachment 33339)
Thanks for the video! It helped a lot.

I wonder if a icon (button looking) would be better than the text ellipsis. Or
move the ellipsis to the inside of the tag so it is where the new attribute
will be insterted? What do you think?

> +            var span = document.createElement('span');
> +            span.className = 'add-attribute';
> +            span.innerText = '…';
> +            this.listItemElement.appendChild(span);
> +            this._addAttributeElement = span;

Better to use a escaped character (\uXXXX) instead of UTF8 here. Also we use
double quotes for string almost esclusivly in our JS.

The textContent property is better to use than innerText. It has no IE
weirdness and is standard.

> +                this._addAttributeElement.parentNode.removeChild( this._addAttributeElement );

No spaces needed here.

> +        if ( tag.getElementsByClassName('webkit-html-attribute').length > 0 ) {

No spaces needed here.

> +        return this._startEditingAttribute(attr, { target: attr });

No spaces needed here.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the webkit-unassigned mailing list