add accessibility to open and close buttons (#311)
refactor the way to focus apps when the menu is opened (#301)
This commit is contained in:
@@ -3,7 +3,13 @@ module.exports = (tagName, attributes) => {
|
||||
|
||||
if (typeof attributes === 'object') {
|
||||
for (let i in attributes) {
|
||||
element.setAttribute(i, attributes[i])
|
||||
if (i === 'text') {
|
||||
element.textContent = attributes[i]
|
||||
} else if (i === 'html') {
|
||||
element.innerHTML = attributes[i]
|
||||
} else {
|
||||
element.setAttribute(i, attributes[i])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user