-
Notifications
You must be signed in to change notification settings - Fork 255
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(framework): make renderImmediately sync, fix lifecycle issues (#1929
- Loading branch information
1 parent
d55515f
commit 9141300
Showing
6 changed files
with
186 additions
and
82 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"> | ||
<meta charset="utf-8"> | ||
|
||
<title>Button</title> | ||
|
||
<script data-ui5-config type="application/json"> | ||
{ | ||
"language": "EN", | ||
"noConflict": { | ||
"events": ["click"] | ||
}, | ||
"calendarType": "Islamic" | ||
} | ||
</script> | ||
|
||
<script src="../../webcomponentsjs/webcomponents-loader.js"></script> | ||
<script src="../../resources/bundle.esm.js" type="module"></script> | ||
<script nomodule src="../../resources/bundle.es5.js"></script> | ||
|
||
</head> | ||
|
||
<body style="background-color: var(--sapBackgroundColor);"> | ||
|
||
<ui5-button id="openDialogButton">Open Dialog</ui5-button> | ||
<br /> | ||
|
||
<template id="dt"> | ||
<ui5-dialog id="hello-dialog" header-text="Dialogs are easy!"> | ||
<div stype="padding: 2rem; display:flex; justify-content: center;"> | ||
Hello World! | ||
<ui5-button id="closeDialogButton">Dismiss</ui5-button> | ||
</div> | ||
</ui5-dialog> | ||
</template> | ||
|
||
<script> | ||
const openBtn = document.getElementById("openDialogButton"); | ||
openBtn.addEventListener("click", () => { | ||
const clone = document.getElementById("dt").content.cloneNode(true); | ||
document.body.appendChild(clone); | ||
const dialog = document.getElementById("hello-dialog"); | ||
const closeBtn = dialog.querySelector("#closeDialogButton"); | ||
closeBtn.addEventListener("click", () => { | ||
dialog.addEventListener("afterClose", () => { | ||
dialog.parentElement.removeChild(dialog); | ||
}); | ||
dialog.close(); | ||
}); | ||
|
||
document.body.appendChild(dialog); | ||
dialog.open(); | ||
}); | ||
</script> | ||
|
||
</body> | ||
</html> |
Oops, something went wrong.