See discussion in https://www.mediawiki.org/w/index.php?title=Topic:Xqalap62gl5lw6nf&topic_showPostId=xqeqg1irns773udq&fromnotif=1#flow-post-xqeqg1irns773udq
Consider a template {{my-template}arg1}arg2 .. |argn}} whose implementation includes an extension tag: <ext>... value-of-arg1 .. value-of-arg2 .. </ext>. So, the extension's tag handler might need access to enclosing transclusion's parameters.
We should either pass these through the sourceToDom API method or provide a separate method for extensions to query.