It's a really minor issue (sorry I'm nit picking 😭)
But I think profile.html lists all of your own profile information.
|
<body> |
|
<h1>User profile</h1> |
|
<script src="./profile.js" type="text/javascript"></script> |
|
</body> |
Since the html format would be the same for each profile, I would consider writing the DOM elements inside the profile.html by default (e.g. h2 etc with all the class names and other attributes like aria-labels), and then for the profile.js file just target each element and use .textContent to change the content of the element.
This means your javascript wouldn't be manipulating DOM too much (which could be faster? 🤔)
It's a really minor issue (sorry I'm nit picking 😭)
But I think
profile.htmllists all of your own profile information.ToVaHayGi/public/profile.html
Lines 9 to 12 in 4b3cf6e
Since the html format would be the same for each profile, I would consider writing the DOM elements inside the
profile.htmlby default (e.g.h2etc with all the class names and other attributes like aria-labels), and then for theprofile.jsfile just target each element and use.textContentto change the content of the element.This means your javascript wouldn't be manipulating DOM too much (which could be faster? 🤔)