You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This feature helps us to keep our code organized and tidy. Of course, this feature speeds up the development time for future scripts. And in order to keep our code base in one line we need to refactor the current approach to how we create the elements.
So let's find each document.createElement() and their followers like: .classList.add(), .setAttribute() ....
and replace it with one sigle line.
The text was updated successfully, but these errors were encountered:
In one of our last PRs we introduced a new function to create elements to our Franklin library.
It is
createElement('htmlTag', ['css', 'classes', ...], {properties: value, ...})
inscripts/lib-franklin.js
View createElement() in action on blocks/chapter-cards/chapter-cards.js
This feature helps us to keep our code organized and tidy. Of course, this feature speeds up the development time for future scripts. And in order to keep our code base in one line we need to refactor the current approach to how we create the elements.
So let's find each
document.createElement()
and their followers like:.classList.add()
,.setAttribute()
....and replace it with one sigle line.
The text was updated successfully, but these errors were encountered: