mirror of
https://github.com/zenorocha/clipboard.js.git
synced 2023-08-10 21:12:48 +03:00
Edit ´getAttributeValue´ to a function declaration
Favoring function declaration over a function expression in this case to follow style guidelines.
This commit is contained in:
parent
ff4755fe4c
commit
15a66df290
@ -9,7 +9,7 @@ const prefix = 'data-clipboard-';
|
|||||||
* @param {String} suffix
|
* @param {String} suffix
|
||||||
* @param {Element} element
|
* @param {Element} element
|
||||||
*/
|
*/
|
||||||
var getAttributeValue = (suffix, element) => {
|
function getAttributeValue(suffix, element) {
|
||||||
let attribute = prefix + suffix;
|
let attribute = prefix + suffix;
|
||||||
|
|
||||||
if (!element.hasAttribute(attribute)) {
|
if (!element.hasAttribute(attribute)) {
|
||||||
@ -17,7 +17,7 @@ var getAttributeValue = (suffix, element) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return element.getAttribute(attribute);
|
return element.getAttribute(attribute);
|
||||||
};
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Base class which takes a selector, delegates a click event to it,
|
* Base class which takes a selector, delegates a click event to it,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user