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

[whatwg] HTML 5 - comments on 5.6 Command APIs

From: Krzysztof Żelechowski <giecrilj@stegny.2a.pl>
Date: Tue, 11 Mar 2008 19:15:27 +0100
Message-ID: <1205259328.6632.32.camel@a1dmin.vola.spe.com.pl>

Dnia 10-03-2008, Pn o godzinie 03:09 +0000, Tom Gilder pisze:

> 3) HTML 5 suggests queryCommandEnabled('Unlink') returns true with any  
> selection:
> 	"Enabled When: The document has a selection that is entirely within  
> an editing host."
> 		-- http://www.whatwg.org/specs/web-apps/current-work/#unlink
> I see no point in returning true when there are no links to remove. IE  
> and Opera currently only return true when the selection contains a  
> link. WebKit follows the current HTML 5 wording.

"Unlink" means "Remove all links".  
There is no point removing all links when there are none 
but there is no harm either.
Me thinks "Unlink" should be enabled in this case.

Which of the following use cases do you consider more common?

Case 1: remove all links (if there are any)
Case 2: 
remove all links, handle an exception if there are none?

Methinks, case 1 wins

Received on Tuesday, 11 March 2008 11:15:27 UTC

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