Skip to content

Commit

Permalink
Getting the new-target-es6 sample to work with the linting rules
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt Gaunt committed Sep 4, 2015
1 parent 106ffa9 commit 50dc30f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion new-target-es6/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,10 @@ <h3>Background</h3>
class Parent {
constructor() {
// new.target is a constructor reference, and new.target.name is human-friendly name.
/* jshint ignore:start */
ChromeSamples.log('Hello from Parent! ' +
'I was constructed via new ' + new.target.name + '()');
'I was constructed via new ' + new.target.name + '()');
/* jshint ignore:end */
}
}

Expand All @@ -40,7 +42,9 @@ <h3>Background</h3>
class SecondChild extends Parent {}

function notAConstructor() {
/* jshint ignore:start */
ChromeSamples.log('Hello from notAConstructor()! My new.target is ' + new.target);
/* jshint ignore:end */
}

// Call all the constructors and the function when the page loads.
Expand Down

0 comments on commit 50dc30f

Please sign in to comment.