mirror of
https://github.com/servo/servo.git
synced 2025-06-13 02:44:29 +00:00
Generate bindings for HTMLInputElement.
This commit is contained in:
parent
c2391fe5ff
commit
14bdd21ed8
10 changed files with 495 additions and 5 deletions
|
@ -561,6 +561,7 @@ addHTMLElement('HTMLHtmlElement')
|
|||
addHTMLElement('HTMLHRElement')
|
||||
addHTMLElement('HTMLIFrameElement')
|
||||
addHTMLElement('HTMLImageElement')
|
||||
addHTMLElement('HTMLInputElement')
|
||||
addHTMLElement('HTMLLinkElement')
|
||||
addHTMLElement('HTMLMetaElement')
|
||||
addHTMLElement('HTMLOListElement')
|
||||
|
|
|
@ -4631,6 +4631,7 @@ class CGBindingRoot(CGThing):
|
|||
'dom::htmlhrelement::HTMLHRElement',
|
||||
'dom::htmliframeelement::HTMLIFrameElement', #XXXjdm
|
||||
'dom::htmlimageelement::HTMLImageElement', #XXXjdm
|
||||
'dom::htmlinputelement::HTMLInputElement',
|
||||
'dom::htmllinkelement::HTMLLinkElement', #XXXrecrack
|
||||
'dom::htmlmetaelement::HTMLMetaElement',
|
||||
'dom::htmlolistelement::HTMLOListElement',
|
||||
|
|
|
@ -0,0 +1,189 @@
|
|||
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
* You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*
|
||||
* The origin of this IDL file is
|
||||
* http://www.whatwg.org/specs/web-apps/current-work/#the-input-element
|
||||
* http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
|
||||
*
|
||||
* © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
|
||||
* Opera Software ASA. You are granted a license to use, reproduce
|
||||
* and create derivative works of this document.
|
||||
*/
|
||||
|
||||
// original import from:
|
||||
// http://hg.mozilla.org/mozilla-central/filelog/8c240c67f76c/dom/webidl/HTMLInputElement.webidl
|
||||
|
||||
/*
|
||||
interface nsIControllers;
|
||||
*/
|
||||
|
||||
interface HTMLInputElement : HTMLElement {
|
||||
[Pure, SetterThrows]
|
||||
attribute DOMString accept;
|
||||
[Pure, SetterThrows]
|
||||
attribute DOMString alt;
|
||||
[Pure, SetterThrows]
|
||||
attribute DOMString autocomplete;
|
||||
[Pure, SetterThrows]
|
||||
attribute boolean autofocus;
|
||||
[Pure, SetterThrows]
|
||||
attribute boolean defaultChecked;
|
||||
[Pure]
|
||||
attribute boolean checked;
|
||||
/*
|
||||
attribute DOMString dirName;
|
||||
*/
|
||||
[Pure, SetterThrows]
|
||||
attribute boolean disabled;
|
||||
/*
|
||||
readonly attribute HTMLFormElement? form;
|
||||
[Pure]
|
||||
readonly attribute FileList? files;
|
||||
*/
|
||||
[Pure, SetterThrows]
|
||||
attribute DOMString formAction;
|
||||
[Pure, SetterThrows]
|
||||
attribute DOMString formEnctype;
|
||||
[Pure, SetterThrows]
|
||||
attribute DOMString formMethod;
|
||||
[Pure, SetterThrows]
|
||||
attribute boolean formNoValidate;
|
||||
[Pure, SetterThrows]
|
||||
attribute DOMString formTarget;
|
||||
[Pure, SetterThrows]
|
||||
attribute unsigned long height;
|
||||
[Pure]
|
||||
attribute boolean indeterminate;
|
||||
[Pure, SetterThrows]
|
||||
attribute DOMString inputMode;
|
||||
/*
|
||||
[Pure]
|
||||
readonly attribute HTMLElement? list;
|
||||
*/
|
||||
[Pure, SetterThrows]
|
||||
attribute DOMString max;
|
||||
[Pure, SetterThrows]
|
||||
attribute long maxLength;
|
||||
[Pure, SetterThrows]
|
||||
attribute DOMString min;
|
||||
[Pure, SetterThrows]
|
||||
attribute boolean multiple;
|
||||
[Pure, SetterThrows]
|
||||
attribute DOMString name;
|
||||
[Pure, SetterThrows]
|
||||
attribute DOMString pattern;
|
||||
[Pure, SetterThrows]
|
||||
attribute DOMString placeholder;
|
||||
[Pure, SetterThrows]
|
||||
attribute boolean readOnly;
|
||||
[Pure, SetterThrows]
|
||||
attribute boolean required;
|
||||
[Pure, SetterThrows]
|
||||
attribute unsigned long size;
|
||||
[Pure, SetterThrows]
|
||||
attribute DOMString src;
|
||||
[Pure, SetterThrows]
|
||||
attribute DOMString step;
|
||||
[Pure, SetterThrows]
|
||||
attribute DOMString type;
|
||||
[Pure, SetterThrows]
|
||||
attribute DOMString defaultValue;
|
||||
[Pure, TreatNullAs=EmptyString, SetterThrows]
|
||||
attribute DOMString value;
|
||||
/*
|
||||
[Throws, Pref="dom.experimental_forms"]
|
||||
attribute Date? valueAsDate;
|
||||
[Pure, SetterThrows]
|
||||
attribute unrestricted double valueAsNumber;
|
||||
*/
|
||||
attribute unsigned long width;
|
||||
/*
|
||||
[Throws]
|
||||
void stepUp(optional long n = 1);
|
||||
[Throws]
|
||||
void stepDown(optional long n = 1);
|
||||
*/
|
||||
|
||||
[Pure]
|
||||
readonly attribute boolean willValidate;
|
||||
/*
|
||||
[Pure]
|
||||
readonly attribute ValidityState validity;
|
||||
*/
|
||||
[GetterThrows]
|
||||
readonly attribute DOMString validationMessage;
|
||||
boolean checkValidity();
|
||||
void setCustomValidity(DOMString error);
|
||||
|
||||
/*
|
||||
readonly attribute NodeList labels;
|
||||
*/
|
||||
|
||||
void select();
|
||||
|
||||
[Throws]
|
||||
// TODO: unsigned vs signed
|
||||
attribute long selectionStart;
|
||||
[Throws]
|
||||
attribute long selectionEnd;
|
||||
[Throws]
|
||||
attribute DOMString selectionDirection;
|
||||
/*
|
||||
// Bug 850364 void setRangeText(DOMString replacement);
|
||||
// Bug 850364 setRangeText(DOMString replacement, unsigned long start, unsigned long end, optional SelectionMode selectionMode);
|
||||
*/
|
||||
// also has obsolete members
|
||||
};
|
||||
|
||||
partial interface HTMLInputElement {
|
||||
[Pure, SetterThrows]
|
||||
attribute DOMString align;
|
||||
[Pure, SetterThrows]
|
||||
attribute DOMString useMap;
|
||||
};
|
||||
|
||||
/*
|
||||
// Mozilla extensions
|
||||
partial interface HTMLInputElement {
|
||||
[Throws]
|
||||
void setSelectionRange(long start, long end, optional DOMString direction);
|
||||
|
||||
[GetterThrows]
|
||||
readonly attribute nsIControllers controllers;
|
||||
[GetterThrows]
|
||||
readonly attribute long textLength;
|
||||
|
||||
[ChromeOnly]
|
||||
sequence<DOMString> mozGetFileNameArray();
|
||||
|
||||
[ChromeOnly]
|
||||
void mozSetFileNameArray(sequence<DOMString> fileNames);
|
||||
|
||||
boolean mozIsTextField(boolean aExcludePassword);
|
||||
};
|
||||
|
||||
partial interface HTMLInputElement {
|
||||
// Mirrored chrome-only nsIDOMNSEditableElement methods. Please make sure
|
||||
// to update this list if nsIDOMNSEditableElement changes.
|
||||
|
||||
[Pure, ChromeOnly]
|
||||
readonly attribute nsIEditor? editor;
|
||||
|
||||
// This is similar to set .value on nsIDOMInput/TextAreaElements, but handling
|
||||
// of the value change is closer to the normal user input, so 'change' event
|
||||
// for example will be dispatched when focusing out the element.
|
||||
[ChromeOnly]
|
||||
void setUserInput(DOMString input);
|
||||
};
|
||||
|
||||
[NoInterfaceObject]
|
||||
interface MozPhonetic {
|
||||
[Pure, ChromeOnly]
|
||||
readonly attribute DOMString phonetic;
|
||||
};
|
||||
|
||||
HTMLInputElement implements MozImageLoadingContent;
|
||||
HTMLInputElement implements MozPhonetic;
|
||||
*/
|
|
@ -13,7 +13,7 @@ use dom::element::{HTMLElementTypeId,
|
|||
HTMLCanvasElementTypeId, HTMLDataElementTypeId,
|
||||
HTMLDivElementTypeId, HTMLHeadElementTypeId, HTMLHRElementTypeId,
|
||||
HTMLHtmlElementTypeId, HTMLIframeElementTypeId, HTMLImageElementTypeId,
|
||||
HTMLLinkElementTypeId,
|
||||
HTMLInputElementTypeId, HTMLLinkElementTypeId,
|
||||
HTMLMetaElementTypeId, HTMLOListElementTypeId,
|
||||
HTMLParagraphElementTypeId, HTMLQuoteElementTypeId, HTMLScriptElementTypeId,
|
||||
HTMLSpanElementTypeId, HTMLSourceElementTypeId,
|
||||
|
@ -36,6 +36,7 @@ use dom::htmldataelement::HTMLDataElement;
|
|||
use dom::htmldlistelement::HTMLDListElement;
|
||||
use dom::htmliframeelement::HTMLIFrameElement;
|
||||
use dom::htmlimageelement::HTMLImageElement;
|
||||
use dom::htmlinputelement::HTMLInputElement;
|
||||
use dom::htmllinkelement::HTMLLinkElement;
|
||||
use dom::htmlmetaelement::HTMLMetaElement;
|
||||
use dom::htmlolistelement::HTMLOListElement;
|
||||
|
@ -133,6 +134,7 @@ pub fn create(cx: *JSContext, node: &mut AbstractNode<ScriptView>) -> *JSObject
|
|||
ElementNodeTypeId(HTMLHtmlElementTypeId) => generate_element!(HTMLHtmlElement),
|
||||
ElementNodeTypeId(HTMLIframeElementTypeId) => generate_element!(HTMLIFrameElement),
|
||||
ElementNodeTypeId(HTMLImageElementTypeId) => generate_element!(HTMLImageElement),
|
||||
ElementNodeTypeId(HTMLInputElementTypeId) => generate_element!(HTMLInputElement),
|
||||
ElementNodeTypeId(HTMLLinkElementTypeId) => generate_element!(HTMLLinkElement),
|
||||
ElementNodeTypeId(HTMLMetaElementTypeId) => generate_element!(HTMLMetaElement),
|
||||
ElementNodeTypeId(HTMLOListElementTypeId) => generate_element!(HTMLOListElement),
|
||||
|
|
|
@ -11,8 +11,8 @@ use dom::bindings::codegen::{HTMLAnchorElementBinding, HTMLAppletElementBinding,
|
|||
HTMLDListElementBinding, HTMLDivElementBinding,
|
||||
HTMLHeadElementBinding, HTMLHRElementBinding,
|
||||
HTMLHtmlElementBinding, HTMLIFrameElementBinding,
|
||||
HTMLImageElementBinding, HTMLMetaElementBinding,
|
||||
HTMLLinkElementBinding,
|
||||
HTMLImageElementBinding, HTMLInputElementBinding,
|
||||
HTMLLinkElementBinding, HTMLMetaElementBinding,
|
||||
HTMLOListElementBinding, HTMLParagraphElementBinding,
|
||||
HTMLQuoteElementBinding,
|
||||
HTMLScriptElementBinding, HTMLSourceElementBinding, HTMLSpanElementBinding,
|
||||
|
@ -39,6 +39,7 @@ use dom::htmlelement::HTMLElement;
|
|||
use dom::htmlhrelement::HTMLHRElement;
|
||||
use dom::htmliframeelement::HTMLIFrameElement;
|
||||
use dom::htmlimageelement::HTMLImageElement;
|
||||
use dom::htmlinputelement::HTMLInputElement;
|
||||
use dom::htmllinkelement::HTMLLinkElement;
|
||||
use dom::htmlmetaelement::HTMLMetaElement;
|
||||
use dom::htmlolistelement::HTMLOListElement;
|
||||
|
@ -148,7 +149,6 @@ pub struct HTMLFontElement { parent: HTMLElement }
|
|||
pub struct HTMLFormElement { parent: HTMLElement }
|
||||
pub struct HTMLHeadElement { parent: HTMLElement }
|
||||
pub struct HTMLHtmlElement { parent: HTMLElement }
|
||||
pub struct HTMLInputElement { parent: HTMLElement }
|
||||
pub struct HTMLListItemElement { parent: HTMLElement }
|
||||
pub struct HTMLOptionElement { parent: HTMLElement }
|
||||
pub struct HTMLParagraphElement { parent: HTMLElement }
|
||||
|
@ -239,6 +239,8 @@ generate_cacheable_wrapper!(HTMLIFrameElement, HTMLIFrameElementBinding::Wrap)
|
|||
generate_binding_object!(HTMLIFrameElement)
|
||||
generate_cacheable_wrapper!(HTMLImageElement, HTMLImageElementBinding::Wrap)
|
||||
generate_binding_object!(HTMLImageElement)
|
||||
generate_cacheable_wrapper!(HTMLInputElement, HTMLInputElementBinding::Wrap)
|
||||
generate_binding_object!(HTMLInputElement)
|
||||
generate_cacheable_wrapper!(HTMLLinkElement, HTMLLinkElementBinding::Wrap)
|
||||
generate_binding_object!(HTMLLinkElement)
|
||||
generate_cacheable_wrapper!(HTMLMetaElement, HTMLMetaElementBinding::Wrap)
|
||||
|
|
285
src/components/script/dom/htmlinputelement.rs
Normal file
285
src/components/script/dom/htmlinputelement.rs
Normal file
|
@ -0,0 +1,285 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use dom::bindings::utils::{DOMString, null_string, ErrorResult};
|
||||
use dom::htmlelement::HTMLElement;
|
||||
|
||||
pub struct HTMLInputElement {
|
||||
parent: HTMLElement,
|
||||
}
|
||||
|
||||
impl HTMLInputElement {
|
||||
pub fn Accept(&self) -> DOMString {
|
||||
null_string
|
||||
}
|
||||
|
||||
pub fn SetAccept(&mut self, _accept: &DOMString, _rv: &mut ErrorResult) {
|
||||
}
|
||||
|
||||
pub fn Alt(&self) -> DOMString {
|
||||
null_string
|
||||
}
|
||||
|
||||
pub fn SetAlt(&mut self, _alt: &DOMString, _rv: &mut ErrorResult) {
|
||||
}
|
||||
|
||||
pub fn Autocomplete(&self) -> DOMString {
|
||||
null_string
|
||||
}
|
||||
|
||||
pub fn SetAutocomplete(&mut self, _autocomple: &DOMString, _rv: &mut ErrorResult) {
|
||||
}
|
||||
|
||||
pub fn Autofocus(&self) -> bool {
|
||||
false
|
||||
}
|
||||
|
||||
pub fn SetAutofocus(&mut self, _autofocus: bool, _rv: &mut ErrorResult) {
|
||||
}
|
||||
|
||||
pub fn DefaultChecked(&self) -> bool {
|
||||
false
|
||||
}
|
||||
|
||||
pub fn SetDefaultChecked(&mut self, _default_checked: bool, _rv: &mut ErrorResult) {
|
||||
}
|
||||
|
||||
pub fn Checked(&self) -> bool {
|
||||
false
|
||||
}
|
||||
|
||||
pub fn SetChecked(&mut self, _checked: bool) {
|
||||
}
|
||||
|
||||
pub fn Disabled(&self) -> bool {
|
||||
false
|
||||
}
|
||||
|
||||
pub fn SetDisabled(&mut self, _disabled: bool, _rv: &mut ErrorResult) {
|
||||
}
|
||||
|
||||
pub fn FormAction(&self) -> DOMString {
|
||||
null_string
|
||||
}
|
||||
|
||||
pub fn SetFormAction(&mut self, _form_action: &DOMString, _rv: &mut ErrorResult) {
|
||||
}
|
||||
|
||||
pub fn FormEnctype(&self) -> DOMString {
|
||||
null_string
|
||||
}
|
||||
|
||||
pub fn SetFormEnctype(&mut self, _form_enctype: &DOMString, _rv: &mut ErrorResult) {
|
||||
}
|
||||
|
||||
pub fn FormMethod(&self) -> DOMString {
|
||||
null_string
|
||||
}
|
||||
|
||||
pub fn SetFormMethod(&mut self, _form_method: &DOMString, _rv: &mut ErrorResult) {
|
||||
}
|
||||
|
||||
pub fn FormNoValidate(&self) -> bool {
|
||||
false
|
||||
}
|
||||
|
||||
pub fn SetFormNoValidate(&mut self, _form_no_validate: bool, _rv: &mut ErrorResult) {
|
||||
}
|
||||
|
||||
pub fn FormTarget(&self) -> DOMString {
|
||||
null_string
|
||||
}
|
||||
|
||||
pub fn SetFormTarget(&mut self, _form_target: &DOMString, _rv: &mut ErrorResult) {
|
||||
}
|
||||
|
||||
pub fn Height(&self) -> u32 {
|
||||
0
|
||||
}
|
||||
|
||||
pub fn SetHeight(&mut self, _height: u32, _rv: &mut ErrorResult) {
|
||||
}
|
||||
|
||||
pub fn Indeterminate(&self) -> bool {
|
||||
false
|
||||
}
|
||||
|
||||
pub fn SetIndeterminate(&mut self, _indeterminate: bool) {
|
||||
}
|
||||
|
||||
pub fn InputMode(&self) -> DOMString {
|
||||
null_string
|
||||
}
|
||||
|
||||
pub fn SetInputMode(&mut self, _input_mode: &DOMString, _rv: &mut ErrorResult) {
|
||||
}
|
||||
|
||||
pub fn Max(&self) -> DOMString {
|
||||
null_string
|
||||
}
|
||||
|
||||
pub fn SetMax(&mut self, _max: &DOMString, _rv: &mut ErrorResult) {
|
||||
}
|
||||
|
||||
pub fn MaxLength(&self) -> i32 {
|
||||
0
|
||||
}
|
||||
|
||||
pub fn SetMaxLength(&mut self, _max_length: i32, _rv: &mut ErrorResult) {
|
||||
}
|
||||
|
||||
pub fn Min(&self) -> DOMString {
|
||||
null_string
|
||||
}
|
||||
|
||||
pub fn SetMin(&mut self, _min: &DOMString, _rv: &mut ErrorResult) {
|
||||
}
|
||||
|
||||
pub fn Multiple(&self) -> bool {
|
||||
false
|
||||
}
|
||||
|
||||
pub fn SetMultiple(&mut self, _multiple: bool, _rv: &mut ErrorResult) {
|
||||
}
|
||||
|
||||
pub fn Name(&self) -> DOMString {
|
||||
null_string
|
||||
}
|
||||
|
||||
pub fn SetName(&mut self, _name: &DOMString, _rv: &mut ErrorResult) {
|
||||
}
|
||||
|
||||
pub fn Pattern(&self) -> DOMString {
|
||||
null_string
|
||||
}
|
||||
|
||||
pub fn SetPattern(&mut self, _pattern: &DOMString, _rv: &mut ErrorResult) {
|
||||
}
|
||||
|
||||
pub fn Placeholder(&self) -> DOMString {
|
||||
null_string
|
||||
}
|
||||
|
||||
pub fn SetPlaceholder(&mut self, _placeholder: &DOMString, _rv: &mut ErrorResult) {
|
||||
}
|
||||
|
||||
pub fn ReadOnly(&self) -> bool {
|
||||
false
|
||||
}
|
||||
|
||||
pub fn SetReadOnly(&mut self, _read_only: bool, _rv: &mut ErrorResult) {
|
||||
}
|
||||
|
||||
pub fn Required(&self) -> bool {
|
||||
false
|
||||
}
|
||||
|
||||
pub fn SetRequired(&mut self, _required: bool, _rv: &mut ErrorResult) {
|
||||
}
|
||||
|
||||
pub fn Size(&self) -> u32 {
|
||||
0
|
||||
}
|
||||
|
||||
pub fn SetSize(&mut self, _size: u32, _rv: &mut ErrorResult) {
|
||||
}
|
||||
|
||||
pub fn Src(&self) -> DOMString {
|
||||
null_string
|
||||
}
|
||||
|
||||
pub fn SetSrc(&mut self, _src: &DOMString, _rv: &mut ErrorResult) {
|
||||
}
|
||||
|
||||
pub fn Step(&self) -> DOMString {
|
||||
null_string
|
||||
}
|
||||
|
||||
pub fn SetStep(&mut self, _step: &DOMString, _rv: &mut ErrorResult) {
|
||||
}
|
||||
|
||||
pub fn Type(&self) -> DOMString {
|
||||
null_string
|
||||
}
|
||||
|
||||
pub fn SetType(&mut self, _type: &DOMString, _rv: &mut ErrorResult) {
|
||||
}
|
||||
|
||||
pub fn DefaultValue(&self) -> DOMString {
|
||||
null_string
|
||||
}
|
||||
|
||||
pub fn SetDefaultValue(&mut self, _default_value: &DOMString, _rv: &mut ErrorResult) {
|
||||
}
|
||||
|
||||
pub fn Value(&self) -> DOMString {
|
||||
null_string
|
||||
}
|
||||
|
||||
pub fn SetValue(&mut self, _value: &DOMString, _rv: &mut ErrorResult) {
|
||||
}
|
||||
|
||||
pub fn Width(&self) -> u32 {
|
||||
0
|
||||
}
|
||||
|
||||
pub fn SetWidth(&mut self, _width: u32) {
|
||||
}
|
||||
|
||||
pub fn WillValidate(&self) -> bool {
|
||||
false
|
||||
}
|
||||
|
||||
pub fn SetWillValidate(&self, _will_validate: bool) {
|
||||
}
|
||||
|
||||
pub fn GetValidationMessage(&self, _rv: &mut ErrorResult) -> DOMString {
|
||||
null_string
|
||||
}
|
||||
|
||||
pub fn CheckValidity(&self) -> bool {
|
||||
false
|
||||
}
|
||||
|
||||
pub fn SetCustomValidity(&self, _error: &DOMString) {
|
||||
}
|
||||
|
||||
pub fn Select(&self) {
|
||||
}
|
||||
|
||||
pub fn GetSelectionStart(&self, _rv: &mut ErrorResult) -> i32 {
|
||||
0
|
||||
}
|
||||
|
||||
pub fn SetSelectionStart(&mut self, _selection_start: i32, _rv: &mut ErrorResult) {
|
||||
}
|
||||
|
||||
pub fn GetSelectionEnd(&self, _rv: &mut ErrorResult) -> i32 {
|
||||
0
|
||||
}
|
||||
|
||||
pub fn SetSelectionEnd(&mut self, _selection_end: i32, _rv: &mut ErrorResult) {
|
||||
}
|
||||
|
||||
pub fn GetSelectionDirection(&self, _rv: &mut ErrorResult) -> DOMString {
|
||||
null_string
|
||||
}
|
||||
|
||||
pub fn SetSelectionDirection(&mut self, _selection_direction: &DOMString, _rv: &mut ErrorResult) {
|
||||
}
|
||||
|
||||
pub fn Align(&self) -> DOMString {
|
||||
null_string
|
||||
}
|
||||
|
||||
pub fn SetAlign(&mut self, _align: &DOMString, _rv: &mut ErrorResult) {
|
||||
}
|
||||
|
||||
pub fn UseMap(&self) -> DOMString {
|
||||
null_string
|
||||
}
|
||||
|
||||
pub fn SetUseMap(&mut self, _align: &DOMString, _rv: &mut ErrorResult) {
|
||||
}
|
||||
}
|
|
@ -22,7 +22,6 @@ use dom::element::{HTMLElementTypeId,
|
|||
UnknownElementTypeId};
|
||||
use dom::element::{HTMLDivElement, HTMLFontElement, HTMLFormElement,
|
||||
HTMLHeadElement, HTMLHeadingElement, HTMLHtmlElement,
|
||||
HTMLInputElement,
|
||||
HTMLOptionElement, HTMLParagraphElement, HTMLListItemElement,
|
||||
HTMLSelectElement, HTMLSmallElement,
|
||||
HTMLSpanElement};
|
||||
|
@ -40,6 +39,7 @@ use dom::htmldlistelement::HTMLDListElement;
|
|||
use dom::htmlhrelement::HTMLHRElement;
|
||||
use dom::htmliframeelement::{IFrameSize, HTMLIFrameElement};
|
||||
use dom::htmlimageelement::HTMLImageElement;
|
||||
use dom::htmlinputelement::HTMLInputElement;
|
||||
use dom::htmllinkelement::HTMLLinkElement;
|
||||
use dom::htmlmetaelement::HTMLMetaElement;
|
||||
use dom::htmlolistelement::HTMLOListElement;
|
||||
|
|
|
@ -60,6 +60,7 @@ pub mod dom {
|
|||
pub mod HTMLHtmlElementBinding;
|
||||
pub mod HTMLIFrameElementBinding;
|
||||
pub mod HTMLImageElementBinding;
|
||||
pub mod HTMLInputElementBinding;
|
||||
pub mod HTMLLinkElementBinding;
|
||||
pub mod HTMLMetaElementBinding;
|
||||
pub mod HTMLOListElementBinding;
|
||||
|
@ -114,6 +115,7 @@ pub mod dom {
|
|||
pub mod htmlhrelement;
|
||||
pub mod htmliframeelement;
|
||||
pub mod htmlimageelement;
|
||||
pub mod htmlinputelement;
|
||||
pub mod htmllinkelement;
|
||||
pub mod htmlmetaelement;
|
||||
pub mod htmlolistelement;
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
<p>pppppppppp</p>
|
||||
<q>qqqqqqqqqqqqqqqqqqqqqqqqqqq</q>
|
||||
<applet></applet>
|
||||
<input type="text" value="input"/>
|
||||
<iframe></iframe>
|
||||
<ol type="1"></ol>
|
||||
<table>
|
||||
|
|
|
@ -220,6 +220,13 @@ for (let i = 0, l = tagList.length; i < l; ++i) {
|
|||
window.alert(tags[0] instanceof HTMLTableColElement);
|
||||
}
|
||||
|
||||
window.alert("HTMLInputElement:");
|
||||
let tags = document.getElementsByTagName("input");
|
||||
window.alert(tags);
|
||||
window.alert(tags.length);
|
||||
window.alert(tags[0].tagName);
|
||||
window.alert(tags[0] instanceof HTMLInputElement);
|
||||
|
||||
//TODO: Doesn't work until we throw proper exceptions instead of returning 0 on
|
||||
// unwrap failure.
|
||||
/*try {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue