- From: Boris Zbarsky via GitHub <sysbot+gh@w3.org>
- Date: Fri, 02 Jun 2017 14:20:18 +0000
- To: public-css-archive@w3.org
Presumably the point is that for compat we want `scrollIntoView()` to act like be `scrollIntoView(true)` but `scrollIntoView(undefined)` to act like `scrollIntoView(false)`; that was certainly the reason for the initial non-use of an optional argument here and use of an overload instead, back when the first arg of the overload was not a dictionary. If that's the case, it sure would be nice if someone just wrote this down, in a note, or comment, or something, so we don't have to keep coming back to it over and over again. That said, I don't think Gecko's current IDL for this (presumably based on an earlier spec draft?) has this property. It looks like this: void scrollIntoView(boolean top); void scrollIntoView(optional ScrollIntoViewOptions options); where `ScrollIntoViewOptions` has `ScrollLogicalPosition block = "start";`. So passing either no arg or `undefined` will give the same behavior as passing `{ block: "center" }` or `true`. The IDL in the spec now does have the property that passing nothing and passing undefined have different behavior. @zcorpan When was it changed from the thing Gecko implements and why? That might tell us what's going on here. -- GitHub Notification of comment by bzbarsky Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/1367#issuecomment-305802299 using your GitHub account
Received on Friday, 2 June 2017 14:20:25 UTC