Merge branch 'master' of https://github.com/primefaces/primevue
commit
958b347f7c
|
@ -183,13 +183,13 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
setAttribute(element, attribute = '', value) {
|
setAttribute(element, attribute = '', value) {
|
||||||
if (element && value !== null && value !== undefined) {
|
if (this.isElement(element) && value !== null && value !== undefined) {
|
||||||
element.setAttribute(attribute, value);
|
element.setAttribute(attribute, value);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
setAttributes(element, attributes = {}) {
|
setAttributes(element, attributes = {}) {
|
||||||
if (element) {
|
if (this.isElement(element)) {
|
||||||
const computedStyles = (rule, value) => {
|
const computedStyles = (rule, value) => {
|
||||||
const styles = element?.$attrs?.[rule] ? [element?.$attrs?.[rule]] : [];
|
const styles = element?.$attrs?.[rule] ? [element?.$attrs?.[rule]] : [];
|
||||||
|
|
||||||
|
@ -231,7 +231,7 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
getAttribute(element, name) {
|
getAttribute(element, name) {
|
||||||
if (element) {
|
if (this.isElement(element)) {
|
||||||
const value = element.getAttribute(name);
|
const value = element.getAttribute(name);
|
||||||
|
|
||||||
if (!isNaN(value)) {
|
if (!isNaN(value)) {
|
||||||
|
@ -249,7 +249,7 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
isAttributeEquals(element, name, value) {
|
isAttributeEquals(element, name, value) {
|
||||||
return element ? this.getAttribute(element, name) === value : false;
|
return this.isElement(element) ? this.getAttribute(element, name) === value : false;
|
||||||
},
|
},
|
||||||
|
|
||||||
isAttributeNotEquals(element, name, value) {
|
isAttributeNotEquals(element, name, value) {
|
||||||
|
|
Loading…
Reference in New Issue