- describe('Declaring context roots', function() {
- it('allows extensions declaring a node as a context root', function() {
- var doc = getDocumentFromXML('<section><div class="a"><div class="b"><div class="c"></div></div></div></section>');
- doc.registerExtension({wlxmlClass: {a: {methods: {
- isContextRoot: function(node) {
- return node.getClass() === 'b';
- }
- }}}});
-
- var divA = doc.root.contents()[0],
- divB = divA.contents()[0],
- divC = divB.contents()[0];
+ describe('Context roots', function() {
+ var doc = getDocumentFromXML('<section><div class="a"><div class="b"><div class="c"></div></div></div></section>');
+ doc.registerExtension({wlxmlClass: {a: {methods: {
+ isContextRoot: function(node) {
+ return node.getClass() === 'b';
+ }
+ }}}});
+
+ var divA = doc.root.contents()[0],
+ divB = divA.contents()[0],
+ divC = divB.contents()[0];