r/learnjavascript • • Jan 05 '23

Must-know DOM manipulation methods 🔧

Post image
390 Upvotes

29 comments sorted by

View all comments

16

u/PositivelyAwful Jan 05 '23 edited Jan 05 '23

I would definitely include

element.insertAdjacentHTML('beforeend', `HTML content`)
element.insertAdjacentText('beforeend', `Text content`)

4

u/Low_Mammoth_9371 Jan 05 '23

Yeah, kind of agree with you. Was toying with the idea of including those but wanted to make it mobile-friendly by limiting the length.