Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function exitDocumentLinkElement() {
dom.exitDocument(document.getElementById('link'));
}
this.app.navigate('/path1#surfaceId1').then(() => {
const surfaceNode = document.querySelector('#surfaceId1');
const {offsetLeft, offsetTop} = utils.getNodeOffset(surfaceNode);
assert.strictEqual(window.pageYOffset, offsetTop);
assert.strictEqual(window.pageXOffset, offsetLeft);
hidePageScrollbar();
dom.exitDocument(parentNode);
done();
});
});
this.app.navigate('/path2').then(() => {
assert.strictEqual(2, surface1.addContent.callCount);
assert.strictEqual('screenId2', surface1.addContent.args[1][0]);
assert.strictEqual(undefined, surface1.addContent.args[1][1]);
assert.strictEqual('default1', surface1.getChild('default').innerHTML);
assert.strictEqual(2, surface2.addContent.callCount);
assert.strictEqual('screenId2', surface2.addContent.args[1][0]);
assert.strictEqual('content2', surface2.addContent.args[1][1]);
dom.exitDocument(surface1.getElement());
dom.exitDocument(surface2.getElement());
done();
});
});
this.pendingStyles.forEach((style) => dom.exitDocument(style));
}
temporariesInDoc.forEach((resource) => dom.exitDocument(resource));
resolve();