.js version of InputHandlerPattern