Last active
November 12, 2020 21:48
-
-
Save dajnz/30b26e951992ef4ca64568a491f0da86 to your computer and use it in GitHub Desktop.
JS snippet for checking how layout behaves with content overflowing
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
var a; | |
var w = document.createTreeWalker( | |
document, | |
NodeFilter.SHOW_TEXT | |
); | |
while(a = w.nextNode()) { | |
if(a.textContent.trim().length) { | |
a.textContent = 'Одиннадцатиклассница пошла посмотреть на достопримечательность, она шла долго, несколько строчек, пока не пришла' | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment