digitalpoint
Well-known member
So rather than clog the boosting performance thread, I'm going to drop questions here as they come up...
Let's say I have this for XF 2.2:
And then this for XF 2.3:
BTW, I haven't actually tested it yet, so ignore the fact that there probably are bugs. That being said, my question is abuot
TL;DR:
Is there a way to reference a
Let's say I have this for XF 2.2:
JavaScript:
this.$target.nextAll('input[name="payload"]').val(JSON.stringify(payload));
this.$target.closest('form').find('.formSubmitRow button').removeClass('is-disabled').prop("disabled", false);
$('#webauthn_verify .status').html($('#webauthn_verify').data('verified'));
And then this for XF 2.3:
JavaScript:
this.$target[0].parentElement.querySelector('input[name="payload"]').value = JSON.stringify(payload);
let element = this.$target[0].closest('form').querySelector('.formSubmitRow button');
element.classList.remove('is-disabled');
element.disabled = false;
document.querySelector('#webauthn_verify .status').innerHTML = document.getElementById('webauthn_verify').dataset.verified;
BTW, I haven't actually tested it yet, so ignore the fact that there probably are bugs. That being said, my question is abuot
this.$target
. In 2.3 I assume we still have it, and I'm thinking I'll probably have to go back to remove the [0] when referencing it since in 2.2 it's just dropping it out of jQuery and getting just the element.TL;DR:
Is there a way to reference a
this.$target
element that works in both 2.2 and 2.3?