Skip to content

Project Reddit (2)#228

Open
Jasonsdc13 wants to merge 2 commits intoprojectshft:masterfrom
Jasonsdc13:master
Open

Project Reddit (2)#228
Jasonsdc13 wants to merge 2 commits intoprojectshft:masterfrom
Jasonsdc13:master

Conversation

@Jasonsdc13
Copy link

No description provided.

let newPostNameNode = document.createTextNode('Posted by: ' + name);
newPostNameP.appendChild(newPostNameNode);

newPostDiv.append(newPostTextP.textContent + " - " + newPostNameP.textContent);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you are appending a string and not a dom element,

newPostDiv.append(newPostTextP, newPostNameP);

newCommentButton.classList.add('btn', 'new-comment-btn');
newCommentButton.textContent = 'Submit Comment'

newCommentButton.addEventListener('click', function() {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

too many listeners, this causes performance issues

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

Successfully merging this pull request may close these issues.

2 participants

Comments