refactor(exam-correct): replace table constraint with better selector

This commit is contained in:
Sarah Vaupel 2020-01-09 12:29:46 +01:00
parent 11c0bd07e9
commit 9d845d3a0b

View File

@ -5,7 +5,7 @@ import { StorageManager, LOCATION } from '../../lib/storage-manager/storage-mana
const EXAM_CORRECT_IDENT = 'uw-exam-correct'; const EXAM_CORRECT_IDENT = 'uw-exam-correct';
@Utility({ @Utility({
selector: `[${EXAM_CORRECT_IDENT}]`, selector: `table[${EXAM_CORRECT_IDENT}]`,
}) })
export class ExamCorrect { export class ExamCorrect {
@ -20,10 +20,6 @@ export class ExamCorrect {
this._element = element; this._element = element;
if (this._element.tagName !== 'TABLE') {
throw new Error('Exam Correct utility can only be setup with a <table> element!');
}
} }
destroy() { destroy() {