fix all tests

This commit is contained in:
Kevin Jahns
2018-11-16 12:33:20 +01:00
parent f94653424a
commit 52abcdd043
10 changed files with 110 additions and 63 deletions

View File

@@ -1,5 +1,5 @@
import { createMutex } from '../../lib/mutex.js'
import { createMutex } from '../lib/mutex.js'
/**
* Abstract class for bindings.

View File

@@ -1,6 +1,6 @@
/* global MutationObserver, getSelection */
import { fromRelativePosition } from '../../Util/relativePosition.js'
import { fromRelativePosition } from '../../src/Util/relativePosition.js'
import Binding from '../Binding.js'
import { createAssociation, removeAssociation } from './util.js'
import { beforeTransactionSelectionFixer, afterTransactionSelectionFixer, getCurrentRelativeSelection } from './selection.js'
@@ -121,8 +121,15 @@ export default class DomBinding extends Binding {
createAssociation(this, target, type)
}
flushDomChanges () {
this._domObserver(this._mutationObserver.takeRecords())
}
/**
* NOTE: currently does not apply filter to existing elements!
* NOTE:
* * does not apply filter to existing elements!
* * only guarantees that changes are filtered locally. Remote sites may see different content.
*
* @param {DomFilter} filter The filter function to use from now on.
*/
setFilter (filter) {

View File

@@ -1,11 +1,11 @@
import YXmlHook from '../../Types/YXml/YXmlHook.js'
import YXmlHook from '../../src/Types/YXml/YXmlHook.js'
import {
iterateUntilUndeleted,
removeAssociation,
insertNodeHelper } from './util.js'
import diff from '../../../lib/simpleDiff.js'
import YXmlFragment from '../../Types/YXml/YXmlFragment.js'
import diff from '../../lib/simpleDiff.js'
import YXmlFragment from '../../src/Types/YXml/YXmlFragment.js'
/**
* 1. Check if any of the nodes was deleted