Re: [csswg-drafts] [resize-observer] Which box information should we pass to the callback (#3329)

Hey guys, just thought I'd share my initial feelings on both options.

### Option A

Pros:
1. Looks cleaner.
2. Properties can always be expected and have value.
3. Less nesting of values.
4. Reduces complexity of callback handlers.

Cons:
1. Confusion on which box is being returned.
2. Potentially less flexible.
3. Could restrict API extension in the future, or, start to clutter the global scope of the entry.

### Option B

Pros:
1. Value is tied to the observed box, reducing confusion.
2. Potentially gives more flexibility for libraries using the API.

Cons:
1. Gives the impression that you can observe multiple boxes, using the same observer. I assume not, but maybe you can?
2. Potentially adds more logic to the observer callback, for value checks.

-- 
GitHub Notification of comment by TremayneChrist
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/3329#issuecomment-466979238 using your GitHub account

Received on Monday, 25 February 2019 11:36:12 UTC