ladybird/Tests/LibWeb/Layout/input/input-placeholder.html
Timothy Flynn 6af7f7e0f5 LibWeb: Update placeholder visibility when the placeholder value changes
Otherwise, setting a placeholder on an element that previously did not
have a placeholder would have no visible effect.
2024-04-04 21:06:45 +02:00

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>