[whatwg] Proposed updates for the command API's

Ian Hickson ian at hixie.ch
Wed Aug 13 18:06:28 PDT 2008


On Wed, 13 Aug 2008, Dav Glass wrote:
> > Why not do:
> >   function showInfo() {
> >     // do whatever you want with elements
> >     // ...
> >  }
> 
> So what about if I did a document.execCommand('bold') on that selection? 
> I wouldn't be able to get the new <B> elements with the above.
> [...]
> However, the modifiedNodes property should still work for:
> execCommand('inserthtml', '<b>Bold</b> <em>Em</em>');
> execCommand('insertimage', 'URL');
> execCommand('insertANYTHING');
> 
> Then when there is no selection, I can still tell what items were added 
> to the document via execCommand.

Interesting stuff. Thanks. I've added this to the list of feedback to deal 
with for the editing part of the spec.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'



More information about the whatwg mailing list