New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added rudimentary innerText function. #3584
base: main
Are you sure you want to change the base?
Conversation
I noticed that a majority of the tests just failed. They passed on my system, and I believe the error was that I accidentally deleted one of the files with the |
This isn't exactly the same as the browser's result, but they are similar enough that this implementation works for most purposes. What follows is an example from a recipe site: JSDOM
Watch Full Seasons We're sorry, there seems to be an issue playing this video. Please refresh the page or try again in a moment. WATCH Deselect All Butter, for greasing the pans 1 3/4 cups all-purpose flour, plus more for pans 2 cups sugar 3/4 cups good cocoa powder 2 teaspoons baking soda 1 teaspoon baking powder 1 teaspoon kosher salt 1 cup buttermilk, shaken 1/2 cup vegetable oil 2 extra-large eggs, at room temperature 1 teaspoon pure vanilla extract 1 cup freshly brewed hot coffee Chocolate Buttercream Frosting, recipe follows Chocolate Frosting: 6 ounces good semisweet chocolate (recommended: Callebaut) 1/2 pound (2 sticks) unsalted butter, at room temperature 1 extra-large egg yolk, at room temperature 1 teaspoon pure vanilla extract 1 1/4 cups sifted confectioners' sugar 1 tablespoon instant coffee powder Add to Shopping List Preheat the oven to 350 degrees F. Butter two 8-inch x 2-inch round cake pans. Line with parchment paper, then butter and flour the pans. Copyright 2006, Barefoot Contessa at Home, All Rights Reserved My Private Notes Categories: Our Best Healthy Breakfast Ideas Dishes That Require Very Little Cleanup Slow Cooker Recipes You'll Love Discover More Recipes... The Best Amazon Prime Day 2023 Kitchen Deals Top Grocery Sales on Prime Day What Food Network Editors Are Buying on Prime Day Our Newsletter Sign up for the Food Network Shopping Newsletter Sign Up Related Pages Firefox 115.0.3
Recipes We're sorry, there seems to be an issue playing this video. Please refresh the page or try again in a moment. WATCH Deselect All Butter, for greasing the pans 1 3/4 cups all-purpose flour, plus more for pans 2 cups sugar 3/4 cups good cocoa powder 2 teaspoons baking soda 1 teaspoon baking powder 1 teaspoon kosher salt 1 cup buttermilk, shaken 1/2 cup vegetable oil 2 extra-large eggs, at room temperature 1 teaspoon pure vanilla extract 1 cup freshly brewed hot coffee Chocolate Buttercream Frosting, recipe follows Chocolate Frosting: 6 ounces good semisweet chocolate (recommended: Callebaut) 1/2 pound (2 sticks) unsalted butter, at room temperature 1 extra-large egg yolk, at room temperature 1 teaspoon pure vanilla extract 1 1/4 cups sifted confectioners' sugar 1 tablespoon instant coffee powder Add to Shopping List Copyright 2006, Barefoot Contessa at Home, All Rights Reserved My Private Notes Your Rating: At home no one cares that the Garten cake flattens out, but for a pot luck or party, the 2 layer frosted box cake makes a grand entrance. 0 Sign up for the Food Network Shopping Newsletter Sign Up What I've noticed is that a lot of whitespace issues are occurring, as well as elements hidden due to specificity or |
Hi @TKDKid1000, is this PR expected to get merged anytime soon? 🙏 |
After needing the innerText feature for a project of mine, I decided to quickly draft up a mock version of one that could be used. This implementation follows the HTML Standard as best as I could without implementing any complicated layout management tools.
Known missing features:
white-space
processing.Aside from this, my implementation passes the test case shown in MDN's example, as well as a few other personal tests. I know there are improvements needed, but hopefully this can get people started on an implementation.
This mostly fixes #1245.