-
Notifications
You must be signed in to change notification settings - Fork 109
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
minlength being ignored #91
Comments
Just want to confirm that this doesn't seem to be caused by the underlying HTML-Element library: const document = require("html-element").document;
const el = document.createElement("input");
el.setAttribute("type", "text");
el.setAttribute("minlength", 42);
el.setAttribute("maxlength", 420);
console.log(el.outerHTML); |
https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement The |
Wow, that's fantastic. I don't think that I realized the difference. I'm a bit surprised that |
Sorry, I'm getting the same result with |
Looks like a bug in the HTML-Element library -- I'll report upstream. const document = require("html-element").document;
const el = document.createElement("input");
el.type = "text"
el.minlength = 42
el.minLength = 43
el.maxlength = 420
el.maxLength = 421
console.log(el.outerHTML); <input type="text" maxlength="420" maxLength="421"> But running this in a browser yields: <input type="text" minlength="43" maxlength="421"> |
That PR got merged and they've released a new version of the package so this issue is probably solved now? |
A quick test and the issue seems to still be there for me even when using latest html-element, but someone should take a closer look |
Anyone know why this might be happening?
The text was updated successfully, but these errors were encountered: