You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the shared element transition spec says that createDocumentTransition (modulo any renames in #7788) should take a dictionary, with currently a single member: updateDOM.
Since updateDOM is a necessary, or at least a very commonly needed callback, should the signature instead be createDocumentTransition(callback) and then if needed we can extend that to createDocumentTransition(callback, initDictionary)?
I have a mild preference for createDocumentTransition(callback, initDictionary). The non-optional parameter followed by an optional dictionary. This matches the element.animate(keyframes, options) syntax too.
Discussed this offline today and the conclusion was that createDocumentTransition(callback) is the simpler and preferable syntax. So proposed resolution: "createDocumentTransition takes a callback".
@jakearchibald if I'm reading the whatwg issue right, we want to make callback and dictionaries indistinguishable. So we'd eventually be able to change the API to take a dictionary and the existing code (which passes a callback) would still work. So the above resolution is good for when we eventually have more options to switch to a dictionary?
Currently the shared element transition spec says that createDocumentTransition (modulo any renames in #7788) should take a dictionary, with currently a single member: updateDOM.
Since updateDOM is a necessary, or at least a very commonly needed callback, should the signature instead be
createDocumentTransition(callback)
and then if needed we can extend that tocreateDocumentTransition(callback, initDictionary)
?@jakearchibald
The text was updated successfully, but these errors were encountered: