Include element in validationCallback

Fixes #591
This commit is contained in:
Daniel Imms
2017-03-09 10:23:59 -08:00
parent 2c151f444c
commit b66776a047
3 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -53,7 +53,7 @@ describe('Linkifier', () => {
it('should enable link if true', done => {
addRow('test');
linkifier.registerLinkMatcher(/test/, () => done(), {
validationCallback: (url, cb) => {
validationCallback: (url, element, cb) => {
cb(true);
assert.equal((<HTMLElement>rows[0].firstChild).tagName, 'A');
setTimeout(() => clickElement(rows[0].firstChild), 0);
@@ -65,7 +65,7 @@ describe('Linkifier', () => {
it('should disable link if false', done => {
addRow('test');
linkifier.registerLinkMatcher(/test/, () => assert.fail(), {
validationCallback: (url, cb) => {
validationCallback: (url, element, cb) => {
cb(false);
assert.equal((<HTMLElement>rows[0].firstChild).tagName, 'A');
setTimeout(() => clickElement(rows[0].firstChild), 0);