For example, if you have the library initialized with the document as the container,
then you change the container to something more specific. It will still observe the document for mutations and when destroy is called, only remove the observers from the container that you changed it too, not the original container.
This test will not pass:
xit('will respect and changed config values', function() {
mff.start();
expect(mff.getKnownElements().length).to.equal(document.querySelectorAll('[focusable]').length - document.querySelectorAll('.hidden').length);
mff
.configure({ container : '#iContainMoreFocusables'})
.refresh();
expect(mff.getKnownElements().length).to.equal(document.querySelectorAll('#iContainMoreFocusables li').length);
});
There should be a test for:
- If changing the container after MFF has started, then it should remove the observer from the previous container and add the observer to the current container.
For example, if you have the library initialized with the
documentas the container,then you change the container to something more specific. It will still observe the document for mutations and when destroy is called, only remove the observers from the container that you changed it too, not the original container.
This test will not pass:
There should be a test for: