-
Notifications
You must be signed in to change notification settings - Fork 393
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(template-compiler): disable static content optimization for iframes
- Loading branch information
1 parent
bf7be3f
commit c3c4554
Showing
6 changed files
with
46 additions
and
11 deletions.
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
packages/@lwc/integration-karma/test/rendering/iframe/index.spec.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { createElement } from 'lwc'; | ||
import Component from 'x/component'; | ||
|
||
let spy; | ||
|
||
beforeEach(() => { | ||
spy = spyOn(Element.prototype, 'setAttribute'); | ||
}); | ||
|
||
it('renders iframes correctly - W-17015807', async () => { | ||
const elm = createElement('x-component', { is: Component }); | ||
document.body.appendChild(elm); | ||
|
||
await Promise.resolve(); | ||
|
||
expect(spy).toHaveBeenCalledOnceWith('src', 'about:blank'); | ||
}); |
3 changes: 3 additions & 0 deletions
3
packages/@lwc/integration-karma/test/rendering/iframe/x/component/component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<template> | ||
<iframe src="about:blank"></iframe> | ||
</template> |
3 changes: 3 additions & 0 deletions
3
packages/@lwc/integration-karma/test/rendering/iframe/x/component/component.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import { LightningElement } from 'lwc'; | ||
|
||
export default class extends LightningElement {} |
13 changes: 9 additions & 4 deletions
13
...ages/@lwc/template-compiler/src/__tests__/fixtures/attributes/attribute-allow/expected.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters