refactor(exam-correct): replace table constraint with better selector
This commit is contained in:
parent
11c0bd07e9
commit
9d845d3a0b
@ -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() {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user