From following the JavaScript code, I believe that node.trigger(:input) currently ends up calling this.dispatchEvent('input'). However, that isn't the correct way to dispatch this event, it should be this.dispatchEvent(new Event('input')).
That's presumably the reason why the Cuprite JavaScript class defines a special input() function, instead of calling trigger().
|
input(node) { |
|
let event = document.createEvent("HTMLEvents"); |
|
event.initEvent("input", true, false); |
|
node.dispatchEvent(event); |
|
} |
From following the JavaScript code, I believe that
node.trigger(:input)currently ends up callingthis.dispatchEvent('input'). However, that isn't the correct way to dispatch this event, it should bethis.dispatchEvent(new Event('input')).That's presumably the reason why the
CupriteJavaScript class defines a specialinput()function, instead of callingtrigger().cuprite/lib/capybara/cuprite/javascripts/index.js
Lines 182 to 186 in 2bbf363