- From: Majid Valipour <majidvp@chromium.org>
- Date: Wed, 15 Apr 2015 16:31:56 +0000
- To: Anne van Kesteren <annevk@annevk.nl>, Ian Hickson <ian@hixie.ch>
- Cc: WHATWG <whatwg@whatwg.org>, Majid Valipour <majidvp@chromium.org>
> > > > I think the original approach of adding a fourth argument is much better. > > > > It's also a better API in general, since the URL should always be given. > > If we had a one-argument form with a dictionary, people would consider > not > > giving the URL but just disabling scrolling, which is suboptimal. > > You can require arguments with dictionaries. > Actually URL is optional in current spec and it defaults to current URL. Why is this suboptimal? In anycase If making URL required is a goal then it is best done by introducing a new method to avoid breaking compatibility. I personally find a dictionary with only optional members which have appropriate defaults to be very convenient. Here are some reasonable defaults: - url: current URL - title: current title - state: null - restoreScroll: true (or willRestoreScrollPosition: false)
Received on Wednesday, 15 April 2015 16:32:25 UTC