Fix the domMock and domMock tests for cssText support

This commit is contained in:
Pierre-Yves Gerardy 2016-08-05 12:38:31 +02:00
parent b0848070bc
commit 5fd2e99831
2 changed files with 20 additions and 6 deletions

View file

@ -136,7 +136,11 @@ module.exports = function() {
get style() {
return style
},
set style(value) {
set style(_){
// https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/style#Setting_style
throw new Error("setting element.style is not portable")
},
set cssText(value) {
if (typeof value === "string") {
for (var key in style) style[key] = ""
var rules = value.split(";")