mirror of
https://github.com/servo/servo.git
synced 2025-07-31 03:00:29 +01:00
add TextLength
This commit is contained in:
parent
5c4f54c403
commit
0907940db8
4 changed files with 35 additions and 1 deletions
|
@ -263,6 +263,11 @@ impl HTMLTextAreaElementMethods for HTMLTextAreaElement {
|
|||
self.upcast::<Node>().dirty(NodeDamage::OtherNodeDamage);
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#dom-textarea-textlength
|
||||
fn TextLength(&self) -> u32 {
|
||||
self.textinput.borrow().utf16_len() as u32
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#dom-lfe-labels
|
||||
fn Labels(&self) -> DomRoot<NodeList> {
|
||||
self.upcast::<HTMLElement>().labels()
|
||||
|
|
|
@ -39,7 +39,7 @@ interface HTMLTextAreaElement : HTMLElement {
|
|||
attribute DOMString defaultValue;
|
||||
[CEReactions,TreatNullAs=EmptyString]
|
||||
attribute DOMString value;
|
||||
// readonly attribute unsigned long textLength;
|
||||
readonly attribute unsigned long textLength;
|
||||
|
||||
// readonly attribute boolean willValidate;
|
||||
// readonly attribute ValidityState validity;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue