Add foreignObjectRendering option

This commit is contained in:
Niklas von Hertzen
2017-09-28 19:46:00 +08:00
parent 53dd885279
commit f16d581f04
4 changed files with 17 additions and 8 deletions

View File

@ -115,12 +115,16 @@ const assertPath = (result, expected, desc) => {
});
it('Should render untainted canvas', () => {
return testContainer.contentWindow
.html2canvas(testContainer.contentWindow.forceElement || testContainer.contentWindow.document.documentElement, {
removeContainer: true,
backgroundColor: '#ffffff',
proxy: 'http://localhost:8081/proxy',
...(testContainer.contentWindow.h2cOptions || {})
})
.html2canvas(
testContainer.contentWindow.forceElement ||
testContainer.contentWindow.document.documentElement,
{
removeContainer: true,
backgroundColor: '#ffffff',
proxy: 'http://localhost:8081/proxy',
...(testContainer.contentWindow.h2cOptions || {})
}
)
.then(canvas => {
try {
canvas