Created
February 12, 2020 03:04
-
-
Save tomhodgins/649b7e204a86a86395b1d8ed90bfb767 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
<!DOCTYPE html> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<title></title> | |
<body> | |
<input> | |
<script type=module> | |
import jsincss from 'https://unpkg.com/jsincss/index.vanilla.js' | |
import expand from 'https://unpkg.com/jsincss-auto-expand/index.vanilla.js' | |
jsincss(event => expand('input', 'width')) | |
// Simulate late addition to DOM | |
setTimeout( | |
() => document.body.innerHTML += `<input placeholder="dynamically added later…">`, | |
5000 // 5 seconds | |
) | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment