mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-06 09:01:53 +00:00
Otherwise, setting a placeholder on an element that previously did not have a placeholder would have no visible effect.
17 lines
594 B
HTML
17 lines
594 B
HTML
<!DOCTYPE html><html><head><style>
|
|
* {
|
|
font: 20px 'SerenitySans';
|
|
}
|
|
input {
|
|
width: 200px;
|
|
}
|
|
</style></head><body><input type="text" value="text" />
|
|
<input type="text" placeholder="This placeholder should be visible" />
|
|
<input type="text" value="text" placeholder="This placeholder should not be visible" />
|
|
<input id="placeholder" type="text" />
|
|
<script type="text/javascript">
|
|
document.addEventListener("DOMContentLoaded", () => {
|
|
let input = document.querySelector("#placeholder");
|
|
input.placeholder = "This placeholder should also be visisble";
|
|
});
|
|
</script>
|