$w.Repeater API change / deprecation...

Wix team - is there a pending deprecation of functionality in the Repeater API?

Recently I have been advising some users about the scope of the selector variable and how it applies in action handlers like onClick.

I have just noticed that the $w and $w.Repeater documentation has recently changed and now includes an at() function. This is now used in the action handler example for onClick(). I have numerous handler functions using the (event, $w ( scoped )) event call vs. the new model :

I have checks and the $w ( scoped ) implementation is still working. I just want to know when this is likely to stop working :wink:


Sam (Wix) wrote about this on July 17 Removal of the $w Parameter from Event Handlers

Ahh I missed that post. Good to re-highlight it here!

Thank you!

Good thing I saw this, gonna try to see if I can redo that page properly tomorrow, or i may just yank the whole dang thing down, past midnight, no longer my words haha

Its fairly straight forward Omid

Instead of this:

$w('#elementName').onClick(event, $wScopedSelector) {
     // Do stuff with $wScopedSelector

You do this

$w('#elementName').onClick(event) {
     $wScopedSelector = $w.at(event.context);
    // Do stuff with $wScopedSelector

Good luck

1 Like