-
-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Labels
enhancementNon-breaking improvements to existing behaviourNon-breaking improvements to existing behaviour
Description
The $context parameter of bind functions would be enhanced if it would also accept a string: the query selector of the context node. That would mean you wouldn't necessarily need to import the whole HTMLDocument in a go function, for example.
function go(DocumentBinder $binder):void {
$binder->bindList(["one", "two", "three"], "example-element");
}rather than:
function go(DocumentBinder $binder, HTMLDocument $document):void {
$binder->bindList(["one", "two", "three"], $document->querySelector("example-element"));
}Metadata
Metadata
Assignees
Labels
enhancementNon-breaking improvements to existing behaviourNon-breaking improvements to existing behaviour