peckadesign / pd-naja

1 stars 0 forks source link

`SuggestExtension` can take `SpinnerExtension` as a constructor parameter #18

Closed zipper closed 7 months ago

zipper commented 7 months ago

You may now pass instance of SpinnerExtension into SuggestExtension constructor. If the spinnerExtension is passed and the latter two are omitted, they are set by the passed extension instance. In addition, the target element for the spinner is determined as in the SpinnerExtension algorithm (4). The fallback target is always the form element.

The SpinnerExtension parameter ajaxSpinnerPlaceholderSelector has been renamed to ajaxSpinnerTargetSelector as well as some private methods. The getTargetsByDOM method is now public and used inside the SuggestExtension / Suggest class.