Skip to content

Commit

Permalink
rename replaceHtml to replaceInnerHTML
Browse files Browse the repository at this point in the history
  • Loading branch information
DanFerrer committed Jan 7, 2019
1 parent 50c44bb commit a2367f0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/js/utils/dom.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export function createElement(html) {
return htmlToParentElement(html).firstChild;
}

export function replaceHtml(element, html) {
export function replaceInnerHtml(element, html) {
emptyElement(element);
appendHtml(element, html);
}
Expand Down
8 changes: 5 additions & 3 deletions src/js/view/title.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { style } from 'utils/css';
import { replaceHtml } from 'utils/dom';
import {
replaceInnerHtml
} from 'utils/dom';

const Title = function(_model) {
this.model = _model.player;
Expand Down Expand Up @@ -65,8 +67,8 @@ Object.assign(Title.prototype, {
},

updateText: function(title, description) {
replaceHtml(this.title, title);
replaceHtml(this.description, description);
replaceInnerHtml(this.title, title);
replaceInnerHtml(this.description, description);

if (this.title.firstChild || this.description.firstChild) {
this.show();
Expand Down

0 comments on commit a2367f0

Please sign in to comment.