Use plain JS to get elements and data and values

This commit is contained in:
Alfredo Sumaran 2016-10-05 20:49:43 -05:00
parent 8fd7a59422
commit 6141816c23

View file

@ -10,11 +10,11 @@
$(() => {
const INTERACTIVE_RESOLVE_MODE = 'interactive';
const $conflicts = $(document.getElementById('conflicts'));
const conflictsEl = document.querySelector('#conflicts');
const mergeConflictsStore = gl.mergeConflicts.mergeConflictsStore;
const mergeConflictsService = new gl.mergeConflicts.mergeConflictsService({
conflictsPath: $conflicts.data('conflictsPath'),
resolveConflictsPath: $conflicts.data('resolveConflictsPath')
conflictsPath: conflictsEl.dataset.conflictsPath,
resolveConflictsPath: conflictsEl.dataset.resolveConflictsPath
});
gl.MergeConflictsResolverApp = new Vue({
@ -48,7 +48,7 @@ $(() => {
mergeConflictsStore.setLoadingState(false);
this.$nextTick(() => {
$conflicts.find('.js-syntax-highlight').syntaxHighlight();
$(conflictsEl.querySelectorAll('.js-syntax-highlight')).syntaxHighlight();
});
});
},