diff --git a/src/element/get-params.js b/src/element/get-params.js index b6b821996..54e561541 100644 --- a/src/element/get-params.js +++ b/src/element/get-params.js @@ -42,10 +42,12 @@ function getParams(element) { const passedParams = {}; extend(params, defaults); - const allowedParams = paramsList.map((key) => key.replace(/_/, '')); + const localParamsList = [...paramsList, 'on']; + + const allowedParams = localParamsList.map((key) => key.replace(/_/, '')); // First check props - paramsList.forEach((paramName) => { + localParamsList.forEach((paramName) => { paramName = paramName.replace('_', ''); if (typeof element[paramName] !== 'undefined') { passedParams[paramName] = element[paramName];