W3C home > Mailing lists > Public > whatwg@whatwg.org > August 2008

[whatwg] Proposed updates for the command API's

From: Ian Hickson <ian@hixie.ch>
Date: Thu, 14 Aug 2008 01:06:28 +0000 (UTC)
Message-ID: <Pine.LNX.4.62.0808140105320.5136@hixie.dreamhostps.com>
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.   `._.-(,_..'--(,_..'`-.;.'
Received on Wednesday, 13 August 2008 18:06:28 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:04 UTC