kraken
kraken copied to clipboard
iframe element 未设置 default width/height
使用的 Kraken 版本 | What version of kraken are you using
main
重现步骤 | Steps To Reproduce
iframe element default width 为 300px,height 为 150px。
重现代码 | Code example:
// @TODO: iframe element not config default width/height.
xit('height-004', async () => {
let p;
let div;
p = createElement(
'p',
{
xmlns: 'http://www.w3.org/1999/xhtml',
style: {
'box-sizing': 'border-box',
},
},
[
createText(`Test passes if there is `),
createElement(
'strong',
{
style: {
'box-sizing': 'border-box',
},
},
[createText(`no red`)]
),
createText(`.`),
]
);
div = createElement(
'div',
{
xmlns: 'http://www.w3.org/1999/xhtml',
style: {
position: 'relative',
'box-sizing': 'border-box',
},
},
[
createElement('iframe', {
style: {
border: '1px solid red',
height: 'auto',
position: 'absolute',
width: 'auto',
'box-sizing': 'border-box',
},
}),
createElement('div', {
style: {
position: 'absolute',
border: '1px solid green',
height: '150px',
top: '0',
width: '300px',
'box-sizing': 'border-box',
},
}),
]
);
BODY.appendChild(div);
await snapshot();
});
预期结果 | Expected results:
实际结果 | Actual results: