Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Less dynamically generated DOM for profiles #74

Open
helenzhou6 opened this issue Apr 13, 2018 · 0 comments
Open

Less dynamically generated DOM for profiles #74

helenzhou6 opened this issue Apr 13, 2018 · 0 comments

Comments

@helenzhou6
Copy link

helenzhou6 commented Apr 13, 2018

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? 🤔)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant