Adapter JS handling element input