Skip to content

Implicitly coerce values passed to createTextNode to a string.#401

Merged
bicknellr merged 2 commits intomasterfrom
sd-createTextNode-arg
Oct 21, 2020
Merged

Implicitly coerce values passed to createTextNode to a string.#401
bicknellr merged 2 commits intomasterfrom
sd-createTextNode-arg

Conversation

@bicknellr
Copy link
Copy Markdown
Collaborator

The internal type checker claims that document.createTextNode's argument should be (number|string). I don't think this type is correct or reflected by browser behavior, but loosely coercing to a string before passing the arg provides the same behavior and passes this check.

@bicknellr bicknellr marked this pull request as ready for review October 20, 2020 03:20
@bicknellr bicknellr requested a review from aomarks as a code owner October 20, 2020 03:20
@bicknellr bicknellr requested a review from sorvell October 20, 2020 03:21
@bicknellr bicknellr merged commit f69fc69 into master Oct 21, 2020
@bicknellr bicknellr deleted the sd-createTextNode-arg branch October 21, 2020 00:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants