forked from ampproject/amphtml
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TEST: createElement instead of insertAdjacentHTML (ampproject#23454)
The `defaultValue` property returns "the default value as originally specified in the HTML that created this object." https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement#Properties Test elements for `isFieldDefault` were originally created with `insertAdjacentHTML` to ensure their `defaultValue` properties is generated correctly. It turns out `setAttribute` actually modifies the element's HTML definition, and thus could update the `defaultValue` property. This change migrates the test to use the preferred `createElement` and `setAttribute` to set up test elements.
- Loading branch information
Showing
1 changed file
with
38 additions
and
56 deletions.
There are no files selected for viewing
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