mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Make DOMString represent a non-nullable string.
This commit is contained in:
parent
2975cb69e3
commit
803cd4b7cf
75 changed files with 632 additions and 632 deletions
|
@ -16,7 +16,7 @@ pub struct Attr {
|
|||
value: ~str,
|
||||
name: ~str,
|
||||
namespace: Namespace,
|
||||
prefix: DOMString
|
||||
prefix: Option<DOMString>
|
||||
}
|
||||
|
||||
impl Reflectable for Attr {
|
||||
|
@ -69,27 +69,27 @@ impl Attr {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn LocalName(&self) -> DOMString {
|
||||
pub fn LocalName(&self) -> Option<DOMString> {
|
||||
Some(self.local_name().to_owned())
|
||||
}
|
||||
|
||||
pub fn Value(&self) -> DOMString {
|
||||
pub fn Value(&self) -> Option<DOMString> {
|
||||
Some(self.value.clone())
|
||||
}
|
||||
|
||||
pub fn SetValue(&mut self, value: &DOMString) {
|
||||
pub fn SetValue(&mut self, value: &Option<DOMString>) {
|
||||
self.value = null_str_as_empty(value);
|
||||
}
|
||||
|
||||
pub fn Name(&self) -> DOMString {
|
||||
pub fn Name(&self) -> Option<DOMString> {
|
||||
Some(self.name.clone())
|
||||
}
|
||||
|
||||
pub fn GetNamespaceURI(&self) -> DOMString {
|
||||
pub fn GetNamespaceURI(&self) -> Option<DOMString> {
|
||||
self.namespace.to_str()
|
||||
}
|
||||
|
||||
pub fn GetPrefix(&self) -> DOMString {
|
||||
pub fn GetPrefix(&self) -> Option<DOMString> {
|
||||
self.prefix.clone()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1110,10 +1110,10 @@ for (uint32_t i = 0; i < length; ++i) {
|
|||
declType, None, isOptional, None)
|
||||
|
||||
if isOptional:
|
||||
declType = "Option<DOMString>"
|
||||
declType = "Option<Option<DOMString>>"
|
||||
initialValue = "None"
|
||||
else:
|
||||
declType = "DOMString"
|
||||
declType = "Option<DOMString>"
|
||||
initialValue = None
|
||||
|
||||
return (
|
||||
|
@ -1722,7 +1722,7 @@ def getRetvalDeclarationForType(returnType, descriptorProvider,
|
|||
result = CGWrapper(result, pre="Nullable<", post=">")
|
||||
return result, False
|
||||
if returnType.isString():
|
||||
return CGGeneric("DOMString"), False
|
||||
return CGGeneric("Option<DOMString>"), False
|
||||
if returnType.isEnum():
|
||||
if returnType.nullable():
|
||||
raise TypeError("We don't support nullable enum return values")
|
||||
|
@ -2960,8 +2960,8 @@ class CGCallGenerator(CGThing):
|
|||
if a.type.isObject() and not a.type.nullable() and not a.optional:
|
||||
name = "(JSObject&)" + name
|
||||
#XXXjdm Perhaps we should pass all nontrivial types by borrowed pointer
|
||||
# Aoid passing Option<DOMString> by reference. If only one of optional or
|
||||
# defaultValue are truthy we pass an Option, otherwise it's a concrete DOMString.
|
||||
# Aoid passing Option<Option<DOMString>> by reference. If only one of optional or
|
||||
# defaultValue are truthy we pass an Option, otherwise it's a concrete Option<DOMString>.
|
||||
if a.type.isDictionary() or (a.type.isString() and not (bool(a.defaultValue) ^ a.optional)):
|
||||
name = "&" + name
|
||||
args.append(CGGeneric(name))
|
||||
|
|
|
@ -116,9 +116,9 @@ extern fn InterfaceObjectToString(cx: *JSContext, _argc: c_uint, vp: *mut JSVal)
|
|||
}
|
||||
}
|
||||
|
||||
pub type DOMString = Option<~str>;
|
||||
pub type DOMString = ~str;
|
||||
|
||||
pub fn null_str_as_empty(s: &DOMString) -> ~str {
|
||||
pub fn null_str_as_empty(s: &Option<DOMString>) -> ~str {
|
||||
// We don't use map_default because it would allocate ~"" even for Some.
|
||||
match *s {
|
||||
Some(ref s) => s.clone(),
|
||||
|
@ -126,14 +126,14 @@ pub fn null_str_as_empty(s: &DOMString) -> ~str {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn null_str_as_empty_ref<'a>(s: &'a DOMString) -> &'a str {
|
||||
pub fn null_str_as_empty_ref<'a>(s: &'a Option<DOMString>) -> &'a str {
|
||||
match *s {
|
||||
Some(ref s) => s.as_slice(),
|
||||
None => &'a ""
|
||||
}
|
||||
}
|
||||
|
||||
pub fn null_str_as_word_null(s: &DOMString) -> ~str {
|
||||
pub fn null_str_as_word_null(s: &Option<DOMString>) -> ~str {
|
||||
// We don't use map_default because it would allocate ~"null" even for Some.
|
||||
match *s {
|
||||
Some(ref s) => s.clone(),
|
||||
|
@ -259,7 +259,7 @@ pub fn jsval_to_str(cx: *JSContext, v: JSVal,
|
|||
}
|
||||
|
||||
#[fixed_stack_segment]
|
||||
pub fn jsval_to_domstring(cx: *JSContext, v: JSVal) -> Result<DOMString, ()> {
|
||||
pub fn jsval_to_domstring(cx: *JSContext, v: JSVal) -> Result<Option<DOMString>, ()> {
|
||||
if jsval::is_null(v) || jsval::is_undefined(v) {
|
||||
Ok(None)
|
||||
} else {
|
||||
|
@ -273,7 +273,7 @@ pub fn jsval_to_domstring(cx: *JSContext, v: JSVal) -> Result<DOMString, ()> {
|
|||
}
|
||||
|
||||
#[fixed_stack_segment]
|
||||
pub unsafe fn domstring_to_jsval(cx: *JSContext, string: &DOMString) -> JSVal {
|
||||
pub unsafe fn domstring_to_jsval(cx: *JSContext, string: &Option<DOMString>) -> JSVal {
|
||||
match string {
|
||||
&None => JSVAL_NULL,
|
||||
&Some(ref s) => do s.to_utf16().as_imm_buf |buf, len| {
|
||||
|
|
|
@ -22,11 +22,11 @@ impl CharacterData {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn Data(&self) -> DOMString {
|
||||
pub fn Data(&self) -> Option<DOMString> {
|
||||
Some(self.data.clone())
|
||||
}
|
||||
|
||||
pub fn SetData(&mut self, arg: &DOMString) -> ErrorResult {
|
||||
pub fn SetData(&mut self, arg: &Option<DOMString>) -> ErrorResult {
|
||||
self.data = arg.get_ref().clone();
|
||||
Ok(())
|
||||
}
|
||||
|
@ -35,16 +35,16 @@ impl CharacterData {
|
|||
self.data.len() as u32
|
||||
}
|
||||
|
||||
pub fn SubstringData(&self, offset: u32, count: u32) -> Fallible<DOMString> {
|
||||
pub fn SubstringData(&self, offset: u32, count: u32) -> Fallible<Option<DOMString>> {
|
||||
Ok(Some(self.data.slice(offset as uint, count as uint).to_str()))
|
||||
}
|
||||
|
||||
pub fn AppendData(&mut self, arg: &DOMString) -> ErrorResult {
|
||||
pub fn AppendData(&mut self, arg: &Option<DOMString>) -> ErrorResult {
|
||||
self.data.push_str(arg.get_ref().clone());
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn InsertData(&mut self, _offset: u32, _arg: &DOMString) -> ErrorResult {
|
||||
pub fn InsertData(&mut self, _offset: u32, _arg: &Option<DOMString>) -> ErrorResult {
|
||||
fail!("CharacterData::InsertData() is unimplemented")
|
||||
}
|
||||
|
||||
|
@ -52,7 +52,7 @@ impl CharacterData {
|
|||
fail!("CharacterData::DeleteData() is unimplemented")
|
||||
}
|
||||
|
||||
pub fn ReplaceData(&mut self, _offset: u32, _count: u32, _arg: &DOMString) -> ErrorResult {
|
||||
pub fn ReplaceData(&mut self, _offset: u32, _count: u32, _arg: &Option<DOMString>) -> ErrorResult {
|
||||
fail!("CharacterData::ReplaceData() is unimplemented")
|
||||
}
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@ impl Comment {
|
|||
Node::reflect_node(@mut node, document, CommentBinding::Wrap)
|
||||
}
|
||||
|
||||
pub fn Constructor(owner: @mut Window, data: &DOMString) -> Fallible<AbstractNode<ScriptView>> {
|
||||
pub fn Constructor(owner: @mut Window, data: &Option<DOMString>) -> Fallible<AbstractNode<ScriptView>> {
|
||||
Ok(Comment::new(null_str_as_empty(data), owner.Document()))
|
||||
}
|
||||
}
|
||||
|
|
|
@ -180,19 +180,19 @@ impl Document {
|
|||
self.window.get_cx()
|
||||
}
|
||||
|
||||
pub fn GetElementsByTagName(&self, tag: &DOMString) -> @mut HTMLCollection {
|
||||
pub fn GetElementsByTagName(&self, tag: &Option<DOMString>) -> @mut HTMLCollection {
|
||||
self.createHTMLCollection(|elem| eq_slice(elem.tag_name, null_str_as_empty(tag)))
|
||||
}
|
||||
|
||||
pub fn GetElementsByTagNameNS(&self, _ns: &DOMString, _tag: &DOMString) -> @mut HTMLCollection {
|
||||
pub fn GetElementsByTagNameNS(&self, _ns: &Option<DOMString>, _tag: &Option<DOMString>) -> @mut HTMLCollection {
|
||||
HTMLCollection::new(self.window, ~[])
|
||||
}
|
||||
|
||||
pub fn GetElementsByClassName(&self, _class: &DOMString) -> @mut HTMLCollection {
|
||||
pub fn GetElementsByClassName(&self, _class: &Option<DOMString>) -> @mut HTMLCollection {
|
||||
HTMLCollection::new(self.window, ~[])
|
||||
}
|
||||
|
||||
pub fn GetElementById(&self, id: &DOMString) -> Option<AbstractNode<ScriptView>> {
|
||||
pub fn GetElementById(&self, id: &Option<DOMString>) -> Option<AbstractNode<ScriptView>> {
|
||||
let key: &~str = &null_str_as_empty(id);
|
||||
// TODO: "in tree order, within the context object's tree"
|
||||
// http://dom.spec.whatwg.org/#dom-document-getelementbyid.
|
||||
|
@ -202,7 +202,7 @@ impl Document {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn CreateElement(&self, abstract_self: AbstractDocument, local_name: &DOMString) -> Fallible<AbstractNode<ScriptView>> {
|
||||
pub fn CreateElement(&self, abstract_self: AbstractDocument, local_name: &Option<DOMString>) -> Fallible<AbstractNode<ScriptView>> {
|
||||
let local_name = null_str_as_empty(local_name);
|
||||
if xml_name_type(local_name) == InvalidXMLName {
|
||||
return Err(InvalidCharacter);
|
||||
|
@ -215,15 +215,15 @@ impl Document {
|
|||
DocumentFragment::new(abstract_self)
|
||||
}
|
||||
|
||||
pub fn CreateTextNode(&self, abstract_self: AbstractDocument, data: &DOMString) -> AbstractNode<ScriptView> {
|
||||
pub fn CreateTextNode(&self, abstract_self: AbstractDocument, data: &Option<DOMString>) -> AbstractNode<ScriptView> {
|
||||
Text::new(null_str_as_empty(data), abstract_self)
|
||||
}
|
||||
|
||||
pub fn CreateComment(&self, abstract_self: AbstractDocument, data: &DOMString) -> AbstractNode<ScriptView> {
|
||||
pub fn CreateComment(&self, abstract_self: AbstractDocument, data: &Option<DOMString>) -> AbstractNode<ScriptView> {
|
||||
Comment::new(null_str_as_word_null(data), abstract_self)
|
||||
}
|
||||
|
||||
pub fn CreateEvent(&self, interface: &DOMString) -> Fallible<AbstractEvent> {
|
||||
pub fn CreateEvent(&self, interface: &Option<DOMString>) -> Fallible<AbstractEvent> {
|
||||
match null_str_as_empty_ref(interface) {
|
||||
"UIEvents" => Ok(UIEvent::new(self.window, UIEventTypeId)),
|
||||
"MouseEvents" => Ok(MouseEvent::new(self.window)),
|
||||
|
@ -232,7 +232,7 @@ impl Document {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn Title(&self, _: AbstractDocument) -> DOMString {
|
||||
pub fn Title(&self, _: AbstractDocument) -> Option<DOMString> {
|
||||
let mut title = ~"";
|
||||
match self.doctype {
|
||||
SVG => {
|
||||
|
@ -266,7 +266,7 @@ impl Document {
|
|||
Some(title)
|
||||
}
|
||||
|
||||
pub fn SetTitle(&self, abstract_self: AbstractDocument, title: &DOMString) -> ErrorResult {
|
||||
pub fn SetTitle(&self, abstract_self: AbstractDocument, title: &Option<DOMString>) -> ErrorResult {
|
||||
match self.doctype {
|
||||
SVG => {
|
||||
fail!("no SVG document yet")
|
||||
|
@ -305,7 +305,7 @@ impl Document {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
pub fn GetElementsByName(&self, name: &DOMString) -> @mut HTMLCollection {
|
||||
pub fn GetElementsByName(&self, name: &Option<DOMString>) -> @mut HTMLCollection {
|
||||
self.createHTMLCollection(|elem|
|
||||
elem.get_attr("name").is_some() && eq_slice(elem.get_attr("name").unwrap(), null_str_as_empty(name)))
|
||||
}
|
||||
|
|
|
@ -47,15 +47,15 @@ impl DocumentType {
|
|||
}
|
||||
|
||||
impl DocumentType {
|
||||
pub fn Name(&self) -> DOMString {
|
||||
pub fn Name(&self) -> Option<DOMString> {
|
||||
Some(self.name.clone())
|
||||
}
|
||||
|
||||
pub fn PublicId(&self) -> DOMString {
|
||||
pub fn PublicId(&self) -> Option<DOMString> {
|
||||
self.public_id.clone()
|
||||
}
|
||||
|
||||
pub fn SystemId(&self) -> DOMString {
|
||||
pub fn SystemId(&self) -> Option<DOMString> {
|
||||
self.system_id.clone()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -33,7 +33,7 @@ impl DOMParser {
|
|||
}
|
||||
|
||||
pub fn ParseFromString(&self,
|
||||
_s: &DOMString,
|
||||
_s: &Option<DOMString>,
|
||||
ty: DOMParserBinding::SupportedType)
|
||||
-> Fallible<AbstractDocument> {
|
||||
match ty {
|
||||
|
|
|
@ -154,7 +154,7 @@ impl<'self> Element {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn normalize_attr_name(&self, name: &DOMString) -> ~str {
|
||||
pub fn normalize_attr_name(&self, name: &Option<DOMString>) -> ~str {
|
||||
//FIXME: Throw for XML-invalid names
|
||||
let owner = self.node.owner_doc();
|
||||
if owner.document().doctype == document::HTML { // && self.namespace == Namespace::HTML
|
||||
|
@ -165,7 +165,7 @@ impl<'self> Element {
|
|||
}
|
||||
|
||||
pub fn get_attribute<'a>(&'a self,
|
||||
namespace_url: &DOMString,
|
||||
namespace_url: &Option<DOMString>,
|
||||
name: &str) -> Option<@mut Attr> {
|
||||
let namespace = Namespace::from_str(namespace_url);
|
||||
// FIXME: only case-insensitive in the HTML namespace (as opposed to SVG, etc.)
|
||||
|
@ -179,16 +179,16 @@ impl<'self> Element {
|
|||
|
||||
pub fn set_attr(&mut self,
|
||||
abstract_self: AbstractNode<ScriptView>,
|
||||
raw_name: &DOMString,
|
||||
raw_value: &DOMString) -> ErrorResult {
|
||||
raw_name: &Option<DOMString>,
|
||||
raw_value: &Option<DOMString>) -> ErrorResult {
|
||||
self.set_attribute(abstract_self, namespace::Null, raw_name, raw_value)
|
||||
}
|
||||
|
||||
pub fn set_attribute(&mut self,
|
||||
abstract_self: AbstractNode<ScriptView>,
|
||||
namespace: Namespace,
|
||||
raw_name: &DOMString,
|
||||
raw_value: &DOMString) -> ErrorResult {
|
||||
raw_name: &Option<DOMString>,
|
||||
raw_value: &Option<DOMString>) -> ErrorResult {
|
||||
//FIXME: Throw for XML-invalid names
|
||||
//FIXME: Throw for XMLNS-invalid names
|
||||
let name = null_str_as_empty(raw_name).to_ascii_lower();
|
||||
|
@ -246,7 +246,7 @@ impl<'self> Element {
|
|||
abstract_self: AbstractNode<ScriptView>,
|
||||
namespace: &Namespace,
|
||||
local_name: ~str,
|
||||
value: &DOMString) {
|
||||
value: &Option<DOMString>) {
|
||||
|
||||
if "style" == local_name && *namespace == namespace::Null {
|
||||
self.style_attribute = Some(style::parse_style_attribute(
|
||||
|
@ -280,43 +280,43 @@ impl<'self> Element {
|
|||
}
|
||||
|
||||
impl Element {
|
||||
pub fn TagName(&self) -> DOMString {
|
||||
pub fn TagName(&self) -> Option<DOMString> {
|
||||
Some(self.tag_name.to_owned().to_ascii_upper())
|
||||
}
|
||||
|
||||
pub fn Id(&self, _abstract_self: AbstractNode<ScriptView>) -> DOMString {
|
||||
pub fn Id(&self, _abstract_self: AbstractNode<ScriptView>) -> Option<DOMString> {
|
||||
match self.get_attr(&"id") {
|
||||
Some(x) => Some(x),
|
||||
None => Some(~"")
|
||||
}
|
||||
}
|
||||
|
||||
pub fn SetId(&mut self, abstract_self: AbstractNode<ScriptView>, id: &DOMString) {
|
||||
pub fn SetId(&mut self, abstract_self: AbstractNode<ScriptView>, id: &Option<DOMString>) {
|
||||
self.set_attribute(abstract_self, namespace::Null, &Some(~"id"), id);
|
||||
}
|
||||
|
||||
pub fn GetAttribute(&self, name: &DOMString) -> DOMString {
|
||||
pub fn GetAttribute(&self, name: &Option<DOMString>) -> Option<DOMString> {
|
||||
self.get_attr(null_str_as_empty_ref(name))
|
||||
}
|
||||
|
||||
pub fn GetAttributeNS(&self, namespace: &DOMString, local_name: &DOMString) -> DOMString {
|
||||
pub fn GetAttributeNS(&self, namespace: &Option<DOMString>, local_name: &Option<DOMString>) -> Option<DOMString> {
|
||||
self.get_attribute(namespace, null_str_as_empty_ref(local_name))
|
||||
.map(|attr| attr.value.clone())
|
||||
}
|
||||
|
||||
pub fn SetAttribute(&mut self,
|
||||
abstract_self: AbstractNode<ScriptView>,
|
||||
name: &DOMString,
|
||||
value: &DOMString) -> ErrorResult {
|
||||
name: &Option<DOMString>,
|
||||
value: &Option<DOMString>) -> ErrorResult {
|
||||
self.set_attr(abstract_self, name, value);
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn SetAttributeNS(&mut self,
|
||||
abstract_self: AbstractNode<ScriptView>,
|
||||
namespace_url: &DOMString,
|
||||
name: &DOMString,
|
||||
value: &DOMString) -> ErrorResult {
|
||||
namespace_url: &Option<DOMString>,
|
||||
name: &Option<DOMString>,
|
||||
value: &Option<DOMString>) -> ErrorResult {
|
||||
let name_type = xml_name_type(name.to_str());
|
||||
match name_type {
|
||||
InvalidXMLName => return Err(InvalidCharacter),
|
||||
|
@ -328,35 +328,35 @@ impl Element {
|
|||
self.set_attribute(abstract_self, namespace, name, value)
|
||||
}
|
||||
|
||||
pub fn RemoveAttribute(&self, _name: &DOMString) -> ErrorResult {
|
||||
pub fn RemoveAttribute(&self, _name: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn RemoveAttributeNS(&self, _namespace: &DOMString, _localname: &DOMString) -> ErrorResult {
|
||||
pub fn RemoveAttributeNS(&self, _namespace: &Option<DOMString>, _localname: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn HasAttribute(&self, name: &DOMString) -> bool {
|
||||
pub fn HasAttribute(&self, name: &Option<DOMString>) -> bool {
|
||||
self.GetAttribute(name).is_some()
|
||||
}
|
||||
|
||||
pub fn HasAttributeNS(&self, namespace: &DOMString, local_name: &DOMString) -> bool {
|
||||
pub fn HasAttributeNS(&self, namespace: &Option<DOMString>, local_name: &Option<DOMString>) -> bool {
|
||||
self.GetAttributeNS(namespace, local_name).is_some()
|
||||
}
|
||||
|
||||
pub fn GetElementsByTagName(&self, _localname: &DOMString) -> @mut HTMLCollection {
|
||||
pub fn GetElementsByTagName(&self, _localname: &Option<DOMString>) -> @mut HTMLCollection {
|
||||
HTMLCollection::new(self.node.owner_doc().document().window, ~[])
|
||||
}
|
||||
|
||||
pub fn GetElementsByTagNameNS(&self, _namespace: &DOMString, _localname: &DOMString) -> Fallible<@mut HTMLCollection> {
|
||||
pub fn GetElementsByTagNameNS(&self, _namespace: &Option<DOMString>, _localname: &Option<DOMString>) -> Fallible<@mut HTMLCollection> {
|
||||
Ok(HTMLCollection::new(self.node.owner_doc().document().window, ~[]))
|
||||
}
|
||||
|
||||
pub fn GetElementsByClassName(&self, _names: &DOMString) -> @mut HTMLCollection {
|
||||
pub fn GetElementsByClassName(&self, _names: &Option<DOMString>) -> @mut HTMLCollection {
|
||||
HTMLCollection::new(self.node.owner_doc().document().window, ~[])
|
||||
}
|
||||
|
||||
pub fn MozMatchesSelector(&self, _selector: &DOMString) -> Fallible<bool> {
|
||||
pub fn MozMatchesSelector(&self, _selector: &Option<DOMString>) -> Fallible<bool> {
|
||||
Ok(false)
|
||||
}
|
||||
|
||||
|
@ -452,27 +452,27 @@ impl Element {
|
|||
0
|
||||
}
|
||||
|
||||
pub fn GetInnerHTML(&self) -> Fallible<DOMString> {
|
||||
pub fn GetInnerHTML(&self) -> Fallible<Option<DOMString>> {
|
||||
Ok(None)
|
||||
}
|
||||
|
||||
pub fn SetInnerHTML(&mut self, _value: &DOMString) -> ErrorResult {
|
||||
pub fn SetInnerHTML(&mut self, _value: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn GetOuterHTML(&self) -> Fallible<DOMString> {
|
||||
pub fn GetOuterHTML(&self) -> Fallible<Option<DOMString>> {
|
||||
Ok(None)
|
||||
}
|
||||
|
||||
pub fn SetOuterHTML(&mut self, _value: &DOMString) -> ErrorResult {
|
||||
pub fn SetOuterHTML(&mut self, _value: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn InsertAdjacentHTML(&mut self, _position: &DOMString, _text: &DOMString) -> ErrorResult {
|
||||
pub fn InsertAdjacentHTML(&mut self, _position: &Option<DOMString>, _text: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn QuerySelector(&self, _selectors: &DOMString) -> Fallible<Option<AbstractNode<ScriptView>>> {
|
||||
pub fn QuerySelector(&self, _selectors: &Option<DOMString>) -> Fallible<Option<AbstractNode<ScriptView>>> {
|
||||
Ok(None)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -181,7 +181,7 @@ impl Event {
|
|||
self.phase as u16
|
||||
}
|
||||
|
||||
pub fn Type(&self) -> DOMString {
|
||||
pub fn Type(&self) -> Option<DOMString> {
|
||||
Some(self.type_.clone())
|
||||
}
|
||||
|
||||
|
@ -225,7 +225,7 @@ impl Event {
|
|||
}
|
||||
|
||||
pub fn InitEvent(&mut self,
|
||||
type_: &DOMString,
|
||||
type_: &Option<DOMString>,
|
||||
bubbles: bool,
|
||||
cancelable: bool) -> ErrorResult {
|
||||
self.type_ = null_str_as_word_null(type_);
|
||||
|
@ -240,7 +240,7 @@ impl Event {
|
|||
}
|
||||
|
||||
pub fn Constructor(global: @mut Window,
|
||||
type_: &DOMString,
|
||||
type_: &Option<DOMString>,
|
||||
init: &EventBinding::EventInit) -> Fallible<AbstractEvent> {
|
||||
let ev = Event::new(global, HTMLEventTypeId);
|
||||
ev.mut_event().InitEvent(type_, init.bubbles, init.cancelable);
|
||||
|
|
|
@ -141,7 +141,7 @@ impl EventTarget {
|
|||
}
|
||||
|
||||
pub fn AddEventListener(&mut self,
|
||||
ty: &DOMString,
|
||||
ty: &Option<DOMString>,
|
||||
listener: Option<EventListener>,
|
||||
capture: bool) {
|
||||
for &listener in listener.iter() {
|
||||
|
@ -158,7 +158,7 @@ impl EventTarget {
|
|||
}
|
||||
|
||||
pub fn RemoveEventListener(&mut self,
|
||||
ty: &DOMString,
|
||||
ty: &Option<DOMString>,
|
||||
listener: Option<EventListener>,
|
||||
capture: bool) {
|
||||
for &listener in listener.iter() {
|
||||
|
|
|
@ -11,8 +11,8 @@ use dom::window::Window;
|
|||
use std::hashmap::HashMap;
|
||||
|
||||
enum FormDatum {
|
||||
StringData(DOMString),
|
||||
BlobData { blob: @mut Blob, name: DOMString }
|
||||
StringData(Option<DOMString>),
|
||||
BlobData { blob: @mut Blob, name: Option<DOMString> }
|
||||
}
|
||||
|
||||
pub struct FormData {
|
||||
|
@ -34,7 +34,7 @@ impl FormData {
|
|||
reflect_dom_object(@mut FormData::new_inherited(window), window, FormDataBinding::Wrap)
|
||||
}
|
||||
|
||||
pub fn Append(&mut self, name: &DOMString, value: @mut Blob, filename: Option<DOMString>) {
|
||||
pub fn Append(&mut self, name: &Option<DOMString>, value: @mut Blob, filename: Option<Option<DOMString>>) {
|
||||
let blob = BlobData {
|
||||
blob: value,
|
||||
name: filename.unwrap_or(Some(~"default"))
|
||||
|
@ -42,7 +42,7 @@ impl FormData {
|
|||
self.data.insert(null_str_as_empty(name), blob);
|
||||
}
|
||||
|
||||
pub fn Append_(&mut self, name: &DOMString, value: &DOMString) {
|
||||
pub fn Append_(&mut self, name: &Option<DOMString>, value: &Option<DOMString>) {
|
||||
self.data.insert(null_str_as_empty(name), StringData((*value).clone()));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,107 +27,107 @@ impl HTMLAnchorElement {
|
|||
}
|
||||
|
||||
impl HTMLAnchorElement {
|
||||
pub fn Href(&self) -> DOMString {
|
||||
pub fn Href(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetHref(&mut self, _href: &DOMString) -> ErrorResult {
|
||||
pub fn SetHref(&mut self, _href: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Target(&self) -> DOMString {
|
||||
pub fn Target(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetTarget(&self, _target: &DOMString) -> ErrorResult {
|
||||
pub fn SetTarget(&self, _target: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Download(&self) -> DOMString {
|
||||
pub fn Download(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetDownload(&self, _download: &DOMString) -> ErrorResult {
|
||||
pub fn SetDownload(&self, _download: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Ping(&self) -> DOMString {
|
||||
pub fn Ping(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetPing(&self, _ping: &DOMString) -> ErrorResult {
|
||||
pub fn SetPing(&self, _ping: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Rel(&self) -> DOMString {
|
||||
pub fn Rel(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetRel(&self, _rel: &DOMString) -> ErrorResult {
|
||||
pub fn SetRel(&self, _rel: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Hreflang(&self) -> DOMString {
|
||||
pub fn Hreflang(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetHreflang(&self, _href_lang: &DOMString) -> ErrorResult {
|
||||
pub fn SetHreflang(&self, _href_lang: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Type(&self) -> DOMString {
|
||||
pub fn Type(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetType(&mut self, _type: &DOMString) -> ErrorResult {
|
||||
pub fn SetType(&mut self, _type: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Text(&self) -> DOMString {
|
||||
pub fn Text(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetText(&mut self, _text: &DOMString) -> ErrorResult {
|
||||
pub fn SetText(&mut self, _text: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Coords(&self) -> DOMString {
|
||||
pub fn Coords(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetCoords(&mut self, _coords: &DOMString) -> ErrorResult {
|
||||
pub fn SetCoords(&mut self, _coords: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Charset(&self) -> DOMString {
|
||||
pub fn Charset(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetCharset(&mut self, _charset: &DOMString) -> ErrorResult {
|
||||
pub fn SetCharset(&mut self, _charset: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Name(&self) -> DOMString {
|
||||
pub fn Name(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetName(&mut self, _name: &DOMString) -> ErrorResult {
|
||||
pub fn SetName(&mut self, _name: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Rev(&self) -> DOMString {
|
||||
pub fn Rev(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetRev(&mut self, _rev: &DOMString) -> ErrorResult {
|
||||
pub fn SetRev(&mut self, _rev: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Shape(&self) -> DOMString {
|
||||
pub fn Shape(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetShape(&mut self, _shape: &DOMString) -> ErrorResult {
|
||||
pub fn SetShape(&mut self, _shape: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,51 +27,51 @@ impl HTMLAppletElement {
|
|||
}
|
||||
|
||||
impl HTMLAppletElement {
|
||||
pub fn Align(&self) -> DOMString {
|
||||
pub fn Align(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetAlign(&mut self, _align: &DOMString) -> ErrorResult {
|
||||
pub fn SetAlign(&mut self, _align: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Alt(&self) -> DOMString {
|
||||
pub fn Alt(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetAlt(&self, _alt: &DOMString) -> ErrorResult {
|
||||
pub fn SetAlt(&self, _alt: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Archive(&self) -> DOMString {
|
||||
pub fn Archive(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetArchive(&self, _archive: &DOMString) -> ErrorResult {
|
||||
pub fn SetArchive(&self, _archive: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Code(&self) -> DOMString {
|
||||
pub fn Code(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetCode(&self, _code: &DOMString) -> ErrorResult {
|
||||
pub fn SetCode(&self, _code: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn CodeBase(&self) -> DOMString {
|
||||
pub fn CodeBase(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetCodeBase(&self, _code_base: &DOMString) -> ErrorResult {
|
||||
pub fn SetCodeBase(&self, _code_base: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Height(&self) -> DOMString {
|
||||
pub fn Height(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetHeight(&self, _height: &DOMString) -> ErrorResult {
|
||||
pub fn SetHeight(&self, _height: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
@ -83,19 +83,19 @@ impl HTMLAppletElement {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Name(&self) -> DOMString {
|
||||
pub fn Name(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetName(&mut self, _name: &DOMString) -> ErrorResult {
|
||||
pub fn SetName(&mut self, _name: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Object(&self) -> DOMString {
|
||||
pub fn Object(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetObject(&mut self, _object: &DOMString) -> ErrorResult {
|
||||
pub fn SetObject(&mut self, _object: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
@ -107,11 +107,11 @@ impl HTMLAppletElement {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Width(&self) -> DOMString {
|
||||
pub fn Width(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetWidth(&mut self, _width: &DOMString) -> ErrorResult {
|
||||
pub fn SetWidth(&mut self, _width: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,59 +27,59 @@ impl HTMLAreaElement {
|
|||
}
|
||||
|
||||
impl HTMLAreaElement {
|
||||
pub fn Alt(&self) -> DOMString {
|
||||
pub fn Alt(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetAlt(&self, _alt: &DOMString) -> ErrorResult {
|
||||
pub fn SetAlt(&self, _alt: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Coords(&self) -> DOMString {
|
||||
pub fn Coords(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetCoords(&self, _coords: &DOMString) -> ErrorResult {
|
||||
pub fn SetCoords(&self, _coords: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Shape(&self) -> DOMString {
|
||||
pub fn Shape(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetShape(&self, _shape: &DOMString) -> ErrorResult {
|
||||
pub fn SetShape(&self, _shape: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Href(&self) -> DOMString {
|
||||
pub fn Href(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetHref(&self, _href: &DOMString) -> ErrorResult {
|
||||
pub fn SetHref(&self, _href: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Target(&self) -> DOMString {
|
||||
pub fn Target(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetTarget(&self, _target: &DOMString) -> ErrorResult {
|
||||
pub fn SetTarget(&self, _target: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Download(&self) -> DOMString {
|
||||
pub fn Download(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetDownload(&self, _download: &DOMString) -> ErrorResult {
|
||||
pub fn SetDownload(&self, _download: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Ping(&self) -> DOMString {
|
||||
pub fn Ping(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetPing(&self, _ping: &DOMString) -> ErrorResult {
|
||||
pub fn SetPing(&self, _ping: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
|
|
@ -27,19 +27,19 @@ impl HTMLBaseElement {
|
|||
}
|
||||
|
||||
impl HTMLBaseElement {
|
||||
pub fn Href(&self) -> DOMString {
|
||||
pub fn Href(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetHref(&self, _href: &DOMString) -> ErrorResult {
|
||||
pub fn SetHref(&self, _href: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Target(&self) -> DOMString {
|
||||
pub fn Target(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetTarget(&self, _target: &DOMString) -> ErrorResult {
|
||||
pub fn SetTarget(&self, _target: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,51 +27,51 @@ impl HTMLBodyElement {
|
|||
}
|
||||
|
||||
impl HTMLBodyElement {
|
||||
pub fn Text(&self) -> DOMString {
|
||||
pub fn Text(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetText(&mut self, _text: &DOMString) -> ErrorResult {
|
||||
pub fn SetText(&mut self, _text: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Link(&self) -> DOMString {
|
||||
pub fn Link(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetLink(&self, _link: &DOMString) -> ErrorResult {
|
||||
pub fn SetLink(&self, _link: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn VLink(&self) -> DOMString {
|
||||
pub fn VLink(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetVLink(&self, _v_link: &DOMString) -> ErrorResult {
|
||||
pub fn SetVLink(&self, _v_link: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn ALink(&self) -> DOMString {
|
||||
pub fn ALink(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetALink(&self, _a_link: &DOMString) -> ErrorResult {
|
||||
pub fn SetALink(&self, _a_link: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn BgColor(&self) -> DOMString {
|
||||
pub fn BgColor(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetBgColor(&self, _bg_color: &DOMString) -> ErrorResult {
|
||||
pub fn SetBgColor(&self, _bg_color: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Background(&self) -> DOMString {
|
||||
pub fn Background(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetBackground(&self, _background: &DOMString) -> ErrorResult {
|
||||
pub fn SetBackground(&self, _background: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,11 +27,11 @@ impl HTMLBRElement {
|
|||
}
|
||||
|
||||
impl HTMLBRElement {
|
||||
pub fn Clear(&self) -> DOMString {
|
||||
pub fn Clear(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetClear(&mut self, _text: &DOMString) -> ErrorResult {
|
||||
pub fn SetClear(&mut self, _text: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
|
|
@ -48,27 +48,27 @@ impl HTMLButtonElement {
|
|||
None
|
||||
}
|
||||
|
||||
pub fn FormAction(&self) -> DOMString {
|
||||
pub fn FormAction(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetFormAction(&mut self, _formaction: &DOMString) -> ErrorResult {
|
||||
pub fn SetFormAction(&mut self, _formaction: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn FormEnctype(&self) -> DOMString {
|
||||
pub fn FormEnctype(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetFormEnctype(&mut self, _formenctype: &DOMString) -> ErrorResult {
|
||||
pub fn SetFormEnctype(&mut self, _formenctype: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn FormMethod(&self) -> DOMString {
|
||||
pub fn FormMethod(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetFormMethod(&mut self, _formmethod: &DOMString) -> ErrorResult {
|
||||
pub fn SetFormMethod(&mut self, _formmethod: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
@ -80,35 +80,35 @@ impl HTMLButtonElement {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
pub fn FormTarget(&self) -> DOMString {
|
||||
pub fn FormTarget(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetFormTarget(&mut self, _formtarget: &DOMString) -> ErrorResult {
|
||||
pub fn SetFormTarget(&mut self, _formtarget: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Name(&self) -> DOMString {
|
||||
pub fn Name(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetName(&mut self, _name: &DOMString) -> ErrorResult {
|
||||
pub fn SetName(&mut self, _name: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Type(&self) -> DOMString {
|
||||
pub fn Type(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetType(&mut self, _type: &DOMString) -> ErrorResult {
|
||||
pub fn SetType(&mut self, _type: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Value(&self) -> DOMString {
|
||||
pub fn Value(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetValue(&mut self, _value: &DOMString) -> ErrorResult {
|
||||
pub fn SetValue(&mut self, _value: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
@ -127,11 +127,11 @@ impl HTMLButtonElement {
|
|||
pub fn SetValidity(&mut self, _validity: @mut ValidityState) {
|
||||
}
|
||||
|
||||
pub fn ValidationMessage(&self) -> DOMString {
|
||||
pub fn ValidationMessage(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetValidationMessage(&mut self, _message: &DOMString) -> ErrorResult {
|
||||
pub fn SetValidationMessage(&mut self, _message: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
@ -139,6 +139,6 @@ impl HTMLButtonElement {
|
|||
true
|
||||
}
|
||||
|
||||
pub fn SetCustomValidity(&mut self, _error: &DOMString) {
|
||||
pub fn SetCustomValidity(&mut self, _error: &Option<DOMString>) {
|
||||
}
|
||||
}
|
||||
|
|
|
@ -46,7 +46,7 @@ impl HTMLCollection {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn NamedItem(&self, _cx: *JSContext, _name: &DOMString) -> Fallible<*JSObject> {
|
||||
pub fn NamedItem(&self, _cx: *JSContext, _name: &Option<DOMString>) -> Fallible<*JSObject> {
|
||||
Ok(ptr::null())
|
||||
}
|
||||
|
||||
|
@ -55,7 +55,7 @@ impl HTMLCollection {
|
|||
self.Item(index)
|
||||
}
|
||||
|
||||
pub fn NamedGetter(&self, _cx: *JSContext, _name: &DOMString, _found: &mut bool) -> Fallible<*JSObject> {
|
||||
pub fn NamedGetter(&self, _cx: *JSContext, _name: &Option<DOMString>, _found: &mut bool) -> Fallible<*JSObject> {
|
||||
Ok(ptr::null())
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,11 +27,11 @@ impl HTMLDataElement {
|
|||
}
|
||||
|
||||
impl HTMLDataElement {
|
||||
pub fn Value(&self) -> DOMString {
|
||||
pub fn Value(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetValue(&mut self, _value: &DOMString) -> ErrorResult {
|
||||
pub fn SetValue(&mut self, _value: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,11 +27,11 @@ impl HTMLDivElement {
|
|||
}
|
||||
|
||||
impl HTMLDivElement {
|
||||
pub fn Align(&self) -> DOMString {
|
||||
pub fn Align(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetAlign(&mut self, _align: &DOMString) -> ErrorResult {
|
||||
pub fn SetAlign(&mut self, _align: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
|
|
@ -35,11 +35,11 @@ impl HTMLDListElement {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Type(&self) -> DOMString {
|
||||
pub fn Type(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetType(&mut self, _type: &DOMString) -> ErrorResult {
|
||||
pub fn SetType(&mut self, _type: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,25 +28,25 @@ impl HTMLElement {
|
|||
}
|
||||
|
||||
impl HTMLElement {
|
||||
pub fn Title(&self) -> DOMString {
|
||||
pub fn Title(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetTitle(&mut self, _title: &DOMString) {
|
||||
pub fn SetTitle(&mut self, _title: &Option<DOMString>) {
|
||||
}
|
||||
|
||||
pub fn Lang(&self) -> DOMString {
|
||||
pub fn Lang(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetLang(&mut self, _lang: &DOMString) {
|
||||
pub fn SetLang(&mut self, _lang: &Option<DOMString>) {
|
||||
}
|
||||
|
||||
pub fn Dir(&self) -> DOMString {
|
||||
pub fn Dir(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetDir(&mut self, _dir: &DOMString) -> ErrorResult {
|
||||
pub fn SetDir(&mut self, _dir: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
@ -85,15 +85,15 @@ impl HTMLElement {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
pub fn AccessKey(&self) -> DOMString {
|
||||
pub fn AccessKey(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetAccessKey(&self, _key: &DOMString) -> ErrorResult {
|
||||
pub fn SetAccessKey(&self, _key: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn AccessKeyLabel(&self) -> DOMString {
|
||||
pub fn AccessKeyLabel(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
|
@ -105,11 +105,11 @@ impl HTMLElement {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
pub fn ContentEditable(&self) -> DOMString {
|
||||
pub fn ContentEditable(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetContentEditable(&mut self, _val: &DOMString) -> ErrorResult {
|
||||
pub fn SetContentEditable(&mut self, _val: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
@ -125,11 +125,11 @@ impl HTMLElement {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
pub fn ClassName(&self) -> DOMString {
|
||||
pub fn ClassName(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetClassName(&self, _class: &DOMString) {
|
||||
pub fn SetClassName(&self, _class: &Option<DOMString>) {
|
||||
}
|
||||
|
||||
pub fn GetOffsetParent(&self) -> Option<AbstractNode<ScriptView>> {
|
||||
|
|
|
@ -27,51 +27,51 @@ impl HTMLEmbedElement {
|
|||
}
|
||||
|
||||
impl HTMLEmbedElement {
|
||||
pub fn Src(&self) -> DOMString {
|
||||
pub fn Src(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetSrc(&mut self, _src: &DOMString) -> ErrorResult {
|
||||
pub fn SetSrc(&mut self, _src: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Type(&self) -> DOMString {
|
||||
pub fn Type(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetType(&mut self, _type: &DOMString) -> ErrorResult {
|
||||
pub fn SetType(&mut self, _type: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Width(&self) -> DOMString {
|
||||
pub fn Width(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetWidth(&mut self, _width: &DOMString) -> ErrorResult {
|
||||
pub fn SetWidth(&mut self, _width: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Height(&self) -> DOMString {
|
||||
pub fn Height(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetHeight(&mut self, _height: &DOMString) -> ErrorResult {
|
||||
pub fn SetHeight(&mut self, _height: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Align(&self) -> DOMString {
|
||||
pub fn Align(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetAlign(&mut self, _type: &DOMString) -> ErrorResult {
|
||||
pub fn SetAlign(&mut self, _type: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Name(&self) -> DOMString {
|
||||
pub fn Name(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetName(&mut self, _type: &DOMString) -> ErrorResult {
|
||||
pub fn SetName(&mut self, _type: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
|
|
@ -41,15 +41,15 @@ impl HTMLFieldSetElement {
|
|||
None
|
||||
}
|
||||
|
||||
pub fn Name(&self) -> DOMString {
|
||||
pub fn Name(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetName(&mut self, _name: &DOMString) -> ErrorResult {
|
||||
pub fn SetName(&mut self, _name: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Type(&self) -> DOMString {
|
||||
pub fn Type(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
|
@ -67,7 +67,7 @@ impl HTMLFieldSetElement {
|
|||
ValidityState::new(global)
|
||||
}
|
||||
|
||||
pub fn ValidationMessage(&self) -> DOMString {
|
||||
pub fn ValidationMessage(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
|
@ -75,6 +75,6 @@ impl HTMLFieldSetElement {
|
|||
false
|
||||
}
|
||||
|
||||
pub fn SetCustomValidity(&mut self, _error: &DOMString) {
|
||||
pub fn SetCustomValidity(&mut self, _error: &Option<DOMString>) {
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,27 +27,27 @@ impl HTMLFontElement {
|
|||
}
|
||||
|
||||
impl HTMLFontElement {
|
||||
pub fn Color(&self) -> DOMString {
|
||||
pub fn Color(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetColor(&mut self, _color: &DOMString) -> ErrorResult {
|
||||
pub fn SetColor(&mut self, _color: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Face(&self) -> DOMString {
|
||||
pub fn Face(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetFace(&mut self, _face: &DOMString) -> ErrorResult {
|
||||
pub fn SetFace(&mut self, _face: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Size(&self) -> DOMString {
|
||||
pub fn Size(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetSize(&mut self, _size: &DOMString) -> ErrorResult {
|
||||
pub fn SetSize(&mut self, _size: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,59 +28,59 @@ impl HTMLFormElement {
|
|||
}
|
||||
|
||||
impl HTMLFormElement {
|
||||
pub fn AcceptCharset(&self) -> DOMString {
|
||||
pub fn AcceptCharset(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetAcceptCharset(&mut self, _accept_charset: &DOMString) -> ErrorResult {
|
||||
pub fn SetAcceptCharset(&mut self, _accept_charset: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Action(&self) -> DOMString {
|
||||
pub fn Action(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetAction(&mut self, _action: &DOMString) -> ErrorResult {
|
||||
pub fn SetAction(&mut self, _action: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Autocomplete(&self) -> DOMString {
|
||||
pub fn Autocomplete(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetAutocomplete(&mut self, _autocomplete: &DOMString) -> ErrorResult {
|
||||
pub fn SetAutocomplete(&mut self, _autocomplete: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Enctype(&self) -> DOMString {
|
||||
pub fn Enctype(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetEnctype(&mut self, _enctype: &DOMString) -> ErrorResult {
|
||||
pub fn SetEnctype(&mut self, _enctype: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Encoding(&self) -> DOMString {
|
||||
pub fn Encoding(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetEncoding(&mut self, _encoding: &DOMString) -> ErrorResult {
|
||||
pub fn SetEncoding(&mut self, _encoding: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Method(&self) -> DOMString {
|
||||
pub fn Method(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetMethod(&mut self, _method: &DOMString) -> ErrorResult {
|
||||
pub fn SetMethod(&mut self, _method: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Name(&self) -> DOMString {
|
||||
pub fn Name(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetName(&mut self, _name: &DOMString) -> ErrorResult {
|
||||
pub fn SetName(&mut self, _name: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
@ -92,11 +92,11 @@ impl HTMLFormElement {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Target(&self) -> DOMString {
|
||||
pub fn Target(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetTarget(&mut self, _target: &DOMString) -> ErrorResult {
|
||||
pub fn SetTarget(&mut self, _target: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
|
|
@ -28,43 +28,43 @@ impl HTMLFrameElement {
|
|||
}
|
||||
|
||||
impl HTMLFrameElement {
|
||||
pub fn Name(&self) -> DOMString {
|
||||
pub fn Name(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetName(&mut self, _name: &DOMString) -> ErrorResult {
|
||||
pub fn SetName(&mut self, _name: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Scrolling(&self) -> DOMString {
|
||||
pub fn Scrolling(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetScrolling(&mut self, _scrolling: &DOMString) -> ErrorResult {
|
||||
pub fn SetScrolling(&mut self, _scrolling: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Src(&self) -> DOMString {
|
||||
pub fn Src(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetSrc(&mut self, _src: &DOMString) -> ErrorResult {
|
||||
pub fn SetSrc(&mut self, _src: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn FrameBorder(&self) -> DOMString {
|
||||
pub fn FrameBorder(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetFrameBorder(&mut self, _frameborder: &DOMString) -> ErrorResult {
|
||||
pub fn SetFrameBorder(&mut self, _frameborder: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn LongDesc(&self) -> DOMString {
|
||||
pub fn LongDesc(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetLongDesc(&mut self, _longdesc: &DOMString) -> ErrorResult {
|
||||
pub fn SetLongDesc(&mut self, _longdesc: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
@ -84,19 +84,19 @@ impl HTMLFrameElement {
|
|||
None
|
||||
}
|
||||
|
||||
pub fn MarginHeight(&self) -> DOMString {
|
||||
pub fn MarginHeight(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetMarginHeight(&mut self, _height: &DOMString) -> ErrorResult {
|
||||
pub fn SetMarginHeight(&mut self, _height: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn MarginWidth(&self) -> DOMString {
|
||||
pub fn MarginWidth(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetMarginWidth(&mut self, _height: &DOMString) -> ErrorResult {
|
||||
pub fn SetMarginWidth(&mut self, _height: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,19 +27,19 @@ impl HTMLFrameSetElement {
|
|||
}
|
||||
|
||||
impl HTMLFrameSetElement {
|
||||
pub fn Cols(&self) -> DOMString {
|
||||
pub fn Cols(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetCols(&mut self, _cols: &DOMString) -> ErrorResult {
|
||||
pub fn SetCols(&mut self, _cols: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Rows(&self) -> DOMString {
|
||||
pub fn Rows(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetRows(&mut self, _rows: &DOMString) -> ErrorResult {
|
||||
pub fn SetRows(&mut self, _rows: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
|
|
@ -38,10 +38,10 @@ impl HTMLHeadingElement {
|
|||
}
|
||||
|
||||
impl HTMLHeadingElement {
|
||||
pub fn Align(&self) -> DOMString {
|
||||
pub fn Align(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetAlign(&mut self, _align: &DOMString) {
|
||||
pub fn SetAlign(&mut self, _align: &Option<DOMString>) {
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,19 +27,19 @@ impl HTMLHRElement {
|
|||
}
|
||||
|
||||
impl HTMLHRElement {
|
||||
pub fn Align(&self) -> DOMString {
|
||||
pub fn Align(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetAlign(&mut self, _align: &DOMString) -> ErrorResult {
|
||||
pub fn SetAlign(&mut self, _align: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Color(&self) -> DOMString {
|
||||
pub fn Color(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetColor(&mut self, _color: &DOMString) -> ErrorResult {
|
||||
pub fn SetColor(&mut self, _color: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
@ -51,19 +51,19 @@ impl HTMLHRElement {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Size(&self) -> DOMString {
|
||||
pub fn Size(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetSize(&mut self, _size: &DOMString) -> ErrorResult {
|
||||
pub fn SetSize(&mut self, _size: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Width(&self) -> DOMString {
|
||||
pub fn Width(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetWidth(&mut self, _width: &DOMString) -> ErrorResult {
|
||||
pub fn SetWidth(&mut self, _width: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,11 +27,11 @@ impl HTMLHtmlElement {
|
|||
}
|
||||
|
||||
impl HTMLHtmlElement {
|
||||
pub fn Version(&self) -> DOMString {
|
||||
pub fn Version(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetVersion(&mut self, _version: &DOMString) -> ErrorResult {
|
||||
pub fn SetVersion(&mut self, _version: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
|
|
@ -77,39 +77,39 @@ impl HTMLIFrameElement {
|
|||
}
|
||||
|
||||
impl HTMLIFrameElement {
|
||||
pub fn Src(&self) -> DOMString {
|
||||
pub fn Src(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetSrc(&mut self, _src: &DOMString) -> ErrorResult {
|
||||
pub fn SetSrc(&mut self, _src: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Srcdoc(&self) -> DOMString {
|
||||
pub fn Srcdoc(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetSrcdoc(&mut self, _srcdoc: &DOMString) -> ErrorResult {
|
||||
pub fn SetSrcdoc(&mut self, _srcdoc: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Name(&self) -> DOMString {
|
||||
pub fn Name(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetName(&mut self, _name: &DOMString) -> ErrorResult {
|
||||
pub fn SetName(&mut self, _name: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Sandbox(&self, _abstract_self: AbstractNode<ScriptView>) -> DOMString {
|
||||
pub fn Sandbox(&self, _abstract_self: AbstractNode<ScriptView>) -> Option<DOMString> {
|
||||
self.htmlelement.element.GetAttribute(&Some(~"sandbox"))
|
||||
}
|
||||
|
||||
pub fn SetSandbox(&mut self, abstract_self: AbstractNode<ScriptView>, sandbox: &DOMString) {
|
||||
pub fn SetSandbox(&mut self, abstract_self: AbstractNode<ScriptView>, sandbox: &Option<DOMString>) {
|
||||
self.htmlelement.element.SetAttribute(abstract_self, &Some(~"sandbox"), sandbox);
|
||||
}
|
||||
|
||||
pub fn AfterSetAttr(&mut self, name: &DOMString, value: &DOMString) {
|
||||
pub fn AfterSetAttr(&mut self, name: &Option<DOMString>, value: &Option<DOMString>) {
|
||||
let name = null_str_as_empty(name);
|
||||
if "sandbox" == name {
|
||||
let mut modes = AllowNothing as u8;
|
||||
|
@ -137,19 +137,19 @@ impl HTMLIFrameElement {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Width(&self) -> DOMString {
|
||||
pub fn Width(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetWidth(&mut self, _width: &DOMString) -> ErrorResult {
|
||||
pub fn SetWidth(&mut self, _width: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Height(&self) -> DOMString {
|
||||
pub fn Height(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetHeight(&mut self, _height: &DOMString) -> ErrorResult {
|
||||
pub fn SetHeight(&mut self, _height: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
@ -161,51 +161,51 @@ impl HTMLIFrameElement {
|
|||
None
|
||||
}
|
||||
|
||||
pub fn Align(&self) -> DOMString {
|
||||
pub fn Align(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetAlign(&mut self, _align: &DOMString) -> ErrorResult {
|
||||
pub fn SetAlign(&mut self, _align: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Scrolling(&self) -> DOMString {
|
||||
pub fn Scrolling(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetScrolling(&mut self, _scrolling: &DOMString) -> ErrorResult {
|
||||
pub fn SetScrolling(&mut self, _scrolling: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn FrameBorder(&self) -> DOMString {
|
||||
pub fn FrameBorder(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetFrameBorder(&mut self, _frameborder: &DOMString) -> ErrorResult {
|
||||
pub fn SetFrameBorder(&mut self, _frameborder: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn LongDesc(&self) -> DOMString {
|
||||
pub fn LongDesc(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetLongDesc(&mut self, _longdesc: &DOMString) -> ErrorResult {
|
||||
pub fn SetLongDesc(&mut self, _longdesc: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn MarginHeight(&self) -> DOMString {
|
||||
pub fn MarginHeight(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetMarginHeight(&mut self, _marginheight: &DOMString) -> ErrorResult {
|
||||
pub fn SetMarginHeight(&mut self, _marginheight: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn MarginWidth(&self) -> DOMString {
|
||||
pub fn MarginWidth(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetMarginWidth(&mut self, _marginwidth: &DOMString) -> ErrorResult {
|
||||
pub fn SetMarginWidth(&mut self, _marginwidth: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
|
|
@ -57,7 +57,7 @@ impl HTMLImageElement {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn AfterSetAttr(&mut self, name: &DOMString, _value: &DOMString) {
|
||||
pub fn AfterSetAttr(&mut self, name: &Option<DOMString>, _value: &Option<DOMString>) {
|
||||
let name = null_str_as_empty(name);
|
||||
if "src" == name {
|
||||
let document = self.htmlelement.element.node.owner_doc();
|
||||
|
@ -67,21 +67,21 @@ impl HTMLImageElement {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn Alt(&self) -> DOMString {
|
||||
pub fn Alt(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetAlt(&mut self, _alt: &DOMString) -> ErrorResult {
|
||||
pub fn SetAlt(&mut self, _alt: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Src(&self, _abstract_self: AbstractNode<ScriptView>) -> DOMString {
|
||||
pub fn Src(&self, _abstract_self: AbstractNode<ScriptView>) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetSrc(&mut self,
|
||||
abstract_self: AbstractNode<ScriptView>,
|
||||
src: &DOMString) -> ErrorResult {
|
||||
src: &Option<DOMString>) -> ErrorResult {
|
||||
let node = &mut self.htmlelement.element;
|
||||
node.set_attr(abstract_self,
|
||||
&Some(~"src"),
|
||||
|
@ -89,19 +89,19 @@ impl HTMLImageElement {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
pub fn CrossOrigin(&self) -> DOMString {
|
||||
pub fn CrossOrigin(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetCrossOrigin(&mut self, _cross_origin: &DOMString) -> ErrorResult {
|
||||
pub fn SetCrossOrigin(&mut self, _cross_origin: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn UseMap(&self) -> DOMString {
|
||||
pub fn UseMap(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetUseMap(&mut self, _use_map: &DOMString) -> ErrorResult {
|
||||
pub fn SetUseMap(&mut self, _use_map: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
@ -167,19 +167,19 @@ impl HTMLImageElement {
|
|||
false
|
||||
}
|
||||
|
||||
pub fn Name(&self) -> DOMString {
|
||||
pub fn Name(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetName(&mut self, _name: &DOMString) -> ErrorResult {
|
||||
pub fn SetName(&mut self, _name: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Align(&self) -> DOMString {
|
||||
pub fn Align(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetAlign(&mut self, _align: &DOMString) -> ErrorResult {
|
||||
pub fn SetAlign(&mut self, _align: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
@ -199,19 +199,19 @@ impl HTMLImageElement {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
pub fn LongDesc(&self) -> DOMString {
|
||||
pub fn LongDesc(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetLongDesc(&mut self, _longdesc: &DOMString) -> ErrorResult {
|
||||
pub fn SetLongDesc(&mut self, _longdesc: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Border(&self) -> DOMString {
|
||||
pub fn Border(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetBorder(&mut self, _border: &DOMString) -> ErrorResult {
|
||||
pub fn SetBorder(&mut self, _border: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,27 +27,27 @@ impl HTMLInputElement {
|
|||
}
|
||||
|
||||
impl HTMLInputElement {
|
||||
pub fn Accept(&self) -> DOMString {
|
||||
pub fn Accept(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetAccept(&mut self, _accept: &DOMString) -> ErrorResult {
|
||||
pub fn SetAccept(&mut self, _accept: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Alt(&self) -> DOMString {
|
||||
pub fn Alt(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetAlt(&mut self, _alt: &DOMString) -> ErrorResult {
|
||||
pub fn SetAlt(&mut self, _alt: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Autocomplete(&self) -> DOMString {
|
||||
pub fn Autocomplete(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetAutocomplete(&mut self, _autocomple: &DOMString) -> ErrorResult {
|
||||
pub fn SetAutocomplete(&mut self, _autocomple: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
@ -82,27 +82,27 @@ impl HTMLInputElement {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
pub fn FormAction(&self) -> DOMString {
|
||||
pub fn FormAction(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetFormAction(&mut self, _form_action: &DOMString) -> ErrorResult {
|
||||
pub fn SetFormAction(&mut self, _form_action: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn FormEnctype(&self) -> DOMString {
|
||||
pub fn FormEnctype(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetFormEnctype(&mut self, _form_enctype: &DOMString) -> ErrorResult {
|
||||
pub fn SetFormEnctype(&mut self, _form_enctype: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn FormMethod(&self) -> DOMString {
|
||||
pub fn FormMethod(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetFormMethod(&mut self, _form_method: &DOMString) -> ErrorResult {
|
||||
pub fn SetFormMethod(&mut self, _form_method: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
@ -114,11 +114,11 @@ impl HTMLInputElement {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
pub fn FormTarget(&self) -> DOMString {
|
||||
pub fn FormTarget(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetFormTarget(&mut self, _form_target: &DOMString) -> ErrorResult {
|
||||
pub fn SetFormTarget(&mut self, _form_target: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
@ -137,19 +137,19 @@ impl HTMLInputElement {
|
|||
pub fn SetIndeterminate(&mut self, _indeterminate: bool) {
|
||||
}
|
||||
|
||||
pub fn InputMode(&self) -> DOMString {
|
||||
pub fn InputMode(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetInputMode(&mut self, _input_mode: &DOMString) -> ErrorResult {
|
||||
pub fn SetInputMode(&mut self, _input_mode: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Max(&self) -> DOMString {
|
||||
pub fn Max(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetMax(&mut self, _max: &DOMString) -> ErrorResult {
|
||||
pub fn SetMax(&mut self, _max: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
@ -161,11 +161,11 @@ impl HTMLInputElement {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Min(&self) -> DOMString {
|
||||
pub fn Min(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetMin(&mut self, _min: &DOMString) -> ErrorResult {
|
||||
pub fn SetMin(&mut self, _min: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
@ -177,27 +177,27 @@ impl HTMLInputElement {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Name(&self) -> DOMString {
|
||||
pub fn Name(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetName(&mut self, _name: &DOMString) -> ErrorResult {
|
||||
pub fn SetName(&mut self, _name: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Pattern(&self) -> DOMString {
|
||||
pub fn Pattern(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetPattern(&mut self, _pattern: &DOMString) -> ErrorResult {
|
||||
pub fn SetPattern(&mut self, _pattern: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Placeholder(&self) -> DOMString {
|
||||
pub fn Placeholder(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetPlaceholder(&mut self, _placeholder: &DOMString) -> ErrorResult {
|
||||
pub fn SetPlaceholder(&mut self, _placeholder: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
@ -225,43 +225,43 @@ impl HTMLInputElement {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Src(&self) -> DOMString {
|
||||
pub fn Src(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetSrc(&mut self, _src: &DOMString) -> ErrorResult {
|
||||
pub fn SetSrc(&mut self, _src: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Step(&self) -> DOMString {
|
||||
pub fn Step(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetStep(&mut self, _step: &DOMString) -> ErrorResult {
|
||||
pub fn SetStep(&mut self, _step: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Type(&self) -> DOMString {
|
||||
pub fn Type(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetType(&mut self, _type: &DOMString) -> ErrorResult {
|
||||
pub fn SetType(&mut self, _type: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn DefaultValue(&self) -> DOMString {
|
||||
pub fn DefaultValue(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetDefaultValue(&mut self, _default_value: &DOMString) -> ErrorResult {
|
||||
pub fn SetDefaultValue(&mut self, _default_value: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Value(&self) -> DOMString {
|
||||
pub fn Value(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetValue(&mut self, _value: &DOMString) -> ErrorResult {
|
||||
pub fn SetValue(&mut self, _value: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
@ -279,7 +279,7 @@ impl HTMLInputElement {
|
|||
pub fn SetWillValidate(&self, _will_validate: bool) {
|
||||
}
|
||||
|
||||
pub fn GetValidationMessage(&self) -> Fallible<DOMString> {
|
||||
pub fn GetValidationMessage(&self) -> Fallible<Option<DOMString>> {
|
||||
Ok(None)
|
||||
}
|
||||
|
||||
|
@ -287,7 +287,7 @@ impl HTMLInputElement {
|
|||
false
|
||||
}
|
||||
|
||||
pub fn SetCustomValidity(&self, _error: &DOMString) {
|
||||
pub fn SetCustomValidity(&self, _error: &Option<DOMString>) {
|
||||
}
|
||||
|
||||
pub fn Select(&self) {
|
||||
|
@ -309,27 +309,27 @@ impl HTMLInputElement {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
pub fn GetSelectionDirection(&self) -> Fallible<DOMString> {
|
||||
pub fn GetSelectionDirection(&self) -> Fallible<Option<DOMString>> {
|
||||
Ok(None)
|
||||
}
|
||||
|
||||
pub fn SetSelectionDirection(&mut self, _selection_direction: &DOMString) -> ErrorResult {
|
||||
pub fn SetSelectionDirection(&mut self, _selection_direction: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Align(&self) -> DOMString {
|
||||
pub fn Align(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetAlign(&mut self, _align: &DOMString) -> ErrorResult {
|
||||
pub fn SetAlign(&mut self, _align: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn UseMap(&self) -> DOMString {
|
||||
pub fn UseMap(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetUseMap(&mut self, _align: &DOMString) -> ErrorResult {
|
||||
pub fn SetUseMap(&mut self, _align: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,10 +27,10 @@ impl HTMLLabelElement {
|
|||
}
|
||||
|
||||
impl HTMLLabelElement {
|
||||
pub fn HtmlFor(&self) -> DOMString {
|
||||
pub fn HtmlFor(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetHtmlFor(&mut self, _html_for: &DOMString) {
|
||||
pub fn SetHtmlFor(&mut self, _html_for: &Option<DOMString>) {
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,11 +27,11 @@ impl HTMLLegendElement {
|
|||
}
|
||||
|
||||
impl HTMLLegendElement {
|
||||
pub fn Align(&self) -> DOMString {
|
||||
pub fn Align(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetAlign(&mut self, _align: &DOMString) -> ErrorResult {
|
||||
pub fn SetAlign(&mut self, _align: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
|
|
@ -35,11 +35,11 @@ impl HTMLLIElement {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Type(&self) -> DOMString {
|
||||
pub fn Type(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetType(&mut self, _type: &DOMString) -> ErrorResult {
|
||||
pub fn SetType(&mut self, _type: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
|
|
@ -34,75 +34,75 @@ impl HTMLLinkElement {
|
|||
pub fn SetDisabled(&mut self, _disable: bool) {
|
||||
}
|
||||
|
||||
pub fn Href(&self) -> DOMString {
|
||||
pub fn Href(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetHref(&mut self, _href: &DOMString) -> ErrorResult {
|
||||
pub fn SetHref(&mut self, _href: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn CrossOrigin(&self) -> DOMString {
|
||||
pub fn CrossOrigin(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetCrossOrigin(&mut self, _cross_origin: &DOMString) -> ErrorResult {
|
||||
pub fn SetCrossOrigin(&mut self, _cross_origin: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Rel(&self) -> DOMString {
|
||||
pub fn Rel(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetRel(&mut self, _rel: &DOMString) -> ErrorResult {
|
||||
pub fn SetRel(&mut self, _rel: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Media(&self) -> DOMString {
|
||||
pub fn Media(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetMedia(&mut self, _media: &DOMString) -> ErrorResult {
|
||||
pub fn SetMedia(&mut self, _media: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Hreflang(&self) -> DOMString {
|
||||
pub fn Hreflang(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetHreflang(&mut self, _href: &DOMString) -> ErrorResult {
|
||||
pub fn SetHreflang(&mut self, _href: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Type(&self) -> DOMString {
|
||||
pub fn Type(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetType(&mut self, _type: &DOMString) -> ErrorResult {
|
||||
pub fn SetType(&mut self, _type: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Charset(&self) -> DOMString {
|
||||
pub fn Charset(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetCharset(&mut self, _charset: &DOMString) -> ErrorResult {
|
||||
pub fn SetCharset(&mut self, _charset: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Rev(&self) -> DOMString {
|
||||
pub fn Rev(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetRev(&mut self, _rev: &DOMString) -> ErrorResult {
|
||||
pub fn SetRev(&mut self, _rev: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Target(&self) -> DOMString {
|
||||
pub fn Target(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetTarget(&mut self, _target: &DOMString) -> ErrorResult {
|
||||
pub fn SetTarget(&mut self, _target: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,11 +28,11 @@ impl HTMLMapElement {
|
|||
}
|
||||
|
||||
impl HTMLMapElement {
|
||||
pub fn Name(&self) -> DOMString {
|
||||
pub fn Name(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetName(&mut self, _name: &DOMString) -> ErrorResult {
|
||||
pub fn SetName(&mut self, _name: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
|
|
@ -20,38 +20,38 @@ impl HTMLMediaElement {
|
|||
}
|
||||
|
||||
impl HTMLMediaElement {
|
||||
pub fn Src(&self) -> DOMString {
|
||||
pub fn Src(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetSrc(&mut self, _src: &DOMString) -> ErrorResult {
|
||||
pub fn SetSrc(&mut self, _src: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn CurrentSrc(&self) -> DOMString {
|
||||
pub fn CurrentSrc(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn CrossOrigin(&self) -> DOMString {
|
||||
pub fn CrossOrigin(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetCrossOrigin(&mut self, _cross_origin: &DOMString) -> ErrorResult {
|
||||
pub fn SetCrossOrigin(&mut self, _cross_origin: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Preload(&self) -> DOMString {
|
||||
pub fn Preload(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetPreload(&mut self, _preload: &DOMString) -> ErrorResult {
|
||||
pub fn SetPreload(&mut self, _preload: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Load(&self) {
|
||||
}
|
||||
|
||||
pub fn CanPlayType(&self, _type: &DOMString) -> DOMString {
|
||||
pub fn CanPlayType(&self, _type: &Option<DOMString>) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
|
|
|
@ -27,35 +27,35 @@ impl HTMLMetaElement {
|
|||
}
|
||||
|
||||
impl HTMLMetaElement {
|
||||
pub fn Name(&self) -> DOMString {
|
||||
pub fn Name(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetName(&mut self, _name: &DOMString) -> ErrorResult {
|
||||
pub fn SetName(&mut self, _name: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn HttpEquiv(&self) -> DOMString {
|
||||
pub fn HttpEquiv(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetHttpEquiv(&mut self, _http_equiv: &DOMString) -> ErrorResult {
|
||||
pub fn SetHttpEquiv(&mut self, _http_equiv: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Content(&self) -> DOMString {
|
||||
pub fn Content(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetContent(&mut self, _content: &DOMString) -> ErrorResult {
|
||||
pub fn SetContent(&mut self, _content: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Scheme(&self) -> DOMString {
|
||||
pub fn Scheme(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetScheme(&mut self, _scheme: &DOMString) -> ErrorResult {
|
||||
pub fn SetScheme(&mut self, _scheme: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,19 +27,19 @@ impl HTMLModElement {
|
|||
}
|
||||
|
||||
impl HTMLModElement {
|
||||
pub fn Cite(&self) -> DOMString {
|
||||
pub fn Cite(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetCite(&mut self, _cite: &DOMString) -> ErrorResult {
|
||||
pub fn SetCite(&mut self, _cite: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn DateTime(&self) -> DOMString {
|
||||
pub fn DateTime(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetDateTime(&mut self, _datetime: &DOMString) -> ErrorResult {
|
||||
pub fn SetDateTime(&mut self, _datetime: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
|
|
@ -29,35 +29,35 @@ impl HTMLObjectElement {
|
|||
}
|
||||
|
||||
impl HTMLObjectElement {
|
||||
pub fn Data(&self) -> DOMString {
|
||||
pub fn Data(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetData(&mut self, _data: &DOMString) -> ErrorResult {
|
||||
pub fn SetData(&mut self, _data: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Type(&self) -> DOMString {
|
||||
pub fn Type(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetType(&mut self, _type: &DOMString) -> ErrorResult {
|
||||
pub fn SetType(&mut self, _type: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Name(&self) -> DOMString {
|
||||
pub fn Name(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetName(&mut self, _name: &DOMString) -> ErrorResult {
|
||||
pub fn SetName(&mut self, _name: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn UseMap(&self) -> DOMString {
|
||||
pub fn UseMap(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetUseMap(&mut self, _use_map: &DOMString) -> ErrorResult {
|
||||
pub fn SetUseMap(&mut self, _use_map: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
@ -65,19 +65,19 @@ impl HTMLObjectElement {
|
|||
None
|
||||
}
|
||||
|
||||
pub fn Width(&self) -> DOMString {
|
||||
pub fn Width(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetWidth(&mut self, _width: &DOMString) -> ErrorResult {
|
||||
pub fn SetWidth(&mut self, _width: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Height(&self) -> DOMString {
|
||||
pub fn Height(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetHeight(&mut self, _height: &DOMString) -> ErrorResult {
|
||||
pub fn SetHeight(&mut self, _height: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
@ -98,7 +98,7 @@ impl HTMLObjectElement {
|
|||
ValidityState::new(global)
|
||||
}
|
||||
|
||||
pub fn ValidationMessage(&self) -> DOMString {
|
||||
pub fn ValidationMessage(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
|
@ -106,30 +106,30 @@ impl HTMLObjectElement {
|
|||
false
|
||||
}
|
||||
|
||||
pub fn SetCustomValidity(&mut self, _error: &DOMString) {
|
||||
pub fn SetCustomValidity(&mut self, _error: &Option<DOMString>) {
|
||||
}
|
||||
|
||||
pub fn Align(&self) -> DOMString {
|
||||
pub fn Align(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetAlign(&mut self, _align: &DOMString) -> ErrorResult {
|
||||
pub fn SetAlign(&mut self, _align: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Archive(&self) -> DOMString {
|
||||
pub fn Archive(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetArchive(&mut self, _archive: &DOMString) -> ErrorResult {
|
||||
pub fn SetArchive(&mut self, _archive: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Code(&self) -> DOMString {
|
||||
pub fn Code(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetCode(&mut self, _code: &DOMString) -> ErrorResult {
|
||||
pub fn SetCode(&mut self, _code: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
@ -149,11 +149,11 @@ impl HTMLObjectElement {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Standby(&self) -> DOMString {
|
||||
pub fn Standby(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetStandby(&mut self, _standby: &DOMString) -> ErrorResult {
|
||||
pub fn SetStandby(&mut self, _standby: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
@ -165,27 +165,27 @@ impl HTMLObjectElement {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
pub fn CodeBase(&self) -> DOMString {
|
||||
pub fn CodeBase(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetCodeBase(&mut self, _codebase: &DOMString) -> ErrorResult {
|
||||
pub fn SetCodeBase(&mut self, _codebase: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn CodeType(&self) -> DOMString {
|
||||
pub fn CodeType(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetCodeType(&mut self, _codetype: &DOMString) -> ErrorResult {
|
||||
pub fn SetCodeType(&mut self, _codetype: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Border(&self) -> DOMString {
|
||||
pub fn Border(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetBorder(&mut self, _border: &DOMString) -> ErrorResult {
|
||||
pub fn SetBorder(&mut self, _border: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
|
|
@ -43,11 +43,11 @@ impl HTMLOListElement {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Type(&self) -> DOMString {
|
||||
pub fn Type(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetType(&mut self, _type: &DOMString) -> ErrorResult {
|
||||
pub fn SetType(&mut self, _type: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
|
|
@ -35,11 +35,11 @@ impl HTMLOptGroupElement {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Label(&self) -> DOMString {
|
||||
pub fn Label(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetLabel(&mut self, _label: &DOMString) -> ErrorResult {
|
||||
pub fn SetLabel(&mut self, _label: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
|
|
@ -39,11 +39,11 @@ impl HTMLOptionElement {
|
|||
None
|
||||
}
|
||||
|
||||
pub fn Label(&self) -> DOMString {
|
||||
pub fn Label(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetLabel(&mut self, _label: &DOMString) -> ErrorResult {
|
||||
pub fn SetLabel(&mut self, _label: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
@ -63,19 +63,19 @@ impl HTMLOptionElement {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Value(&self) -> DOMString {
|
||||
pub fn Value(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetValue(&mut self, _value: &DOMString) -> ErrorResult {
|
||||
pub fn SetValue(&mut self, _value: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Text(&self) -> DOMString {
|
||||
pub fn Text(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetText(&mut self, _text: &DOMString) -> ErrorResult {
|
||||
pub fn SetText(&mut self, _text: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
|
|
@ -32,31 +32,31 @@ impl HTMLOutputElement {
|
|||
None
|
||||
}
|
||||
|
||||
pub fn Name(&self) -> DOMString {
|
||||
pub fn Name(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetName(&mut self, _name: &DOMString) -> ErrorResult {
|
||||
pub fn SetName(&mut self, _name: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Type(&self) -> DOMString {
|
||||
pub fn Type(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn DefaultValue(&self) -> DOMString {
|
||||
pub fn DefaultValue(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetDefaultValue(&mut self, _value: &DOMString) -> ErrorResult {
|
||||
pub fn SetDefaultValue(&mut self, _value: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Value(&self) -> DOMString {
|
||||
pub fn Value(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetValue(&mut self, _value: &DOMString) -> ErrorResult {
|
||||
pub fn SetValue(&mut self, _value: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
@ -75,11 +75,11 @@ impl HTMLOutputElement {
|
|||
pub fn SetValidity(&mut self, _validity: @mut ValidityState) {
|
||||
}
|
||||
|
||||
pub fn ValidationMessage(&self) -> DOMString {
|
||||
pub fn ValidationMessage(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetValidationMessage(&mut self, _message: &DOMString) -> ErrorResult {
|
||||
pub fn SetValidationMessage(&mut self, _message: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
@ -87,6 +87,6 @@ impl HTMLOutputElement {
|
|||
true
|
||||
}
|
||||
|
||||
pub fn SetCustomValidity(&mut self, _error: &DOMString) {
|
||||
pub fn SetCustomValidity(&mut self, _error: &Option<DOMString>) {
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,11 +27,11 @@ impl HTMLParagraphElement {
|
|||
}
|
||||
|
||||
impl HTMLParagraphElement {
|
||||
pub fn Align(&self) -> DOMString {
|
||||
pub fn Align(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetAlign(&mut self, _align: &DOMString) -> ErrorResult {
|
||||
pub fn SetAlign(&mut self, _align: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,35 +27,35 @@ impl HTMLParamElement {
|
|||
}
|
||||
|
||||
impl HTMLParamElement {
|
||||
pub fn Name(&self) -> DOMString {
|
||||
pub fn Name(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetName(&mut self, _name: &DOMString) -> ErrorResult {
|
||||
pub fn SetName(&mut self, _name: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Value(&self) -> DOMString {
|
||||
pub fn Value(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetValue(&mut self, _value: &DOMString) -> ErrorResult {
|
||||
pub fn SetValue(&mut self, _value: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Type(&self) -> DOMString {
|
||||
pub fn Type(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetType(&mut self, _type: &DOMString) -> ErrorResult {
|
||||
pub fn SetType(&mut self, _type: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn ValueType(&self) -> DOMString {
|
||||
pub fn ValueType(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetValueType(&mut self, _value_type: &DOMString) -> ErrorResult {
|
||||
pub fn SetValueType(&mut self, _value_type: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,11 +27,11 @@ impl HTMLQuoteElement {
|
|||
}
|
||||
|
||||
impl HTMLQuoteElement {
|
||||
pub fn Cite(&self) -> DOMString {
|
||||
pub fn Cite(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetCite(&self, _cite: &DOMString) -> ErrorResult {
|
||||
pub fn SetCite(&self, _cite: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,27 +28,27 @@ impl HTMLScriptElement {
|
|||
}
|
||||
|
||||
impl HTMLScriptElement {
|
||||
pub fn Src(&self) -> DOMString {
|
||||
pub fn Src(&self) -> Option<DOMString> {
|
||||
self.htmlelement.element.get_attr("src").map(|s| s.to_str())
|
||||
}
|
||||
|
||||
pub fn SetSrc(&mut self, _src: &DOMString) -> ErrorResult {
|
||||
pub fn SetSrc(&mut self, _src: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Type(&self) -> DOMString {
|
||||
pub fn Type(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetType(&mut self, _type: &DOMString) -> ErrorResult {
|
||||
pub fn SetType(&mut self, _type: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Charset(&self) -> DOMString {
|
||||
pub fn Charset(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetCharset(&mut self, _charset: &DOMString) -> ErrorResult {
|
||||
pub fn SetCharset(&mut self, _charset: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
@ -68,35 +68,35 @@ impl HTMLScriptElement {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
pub fn CrossOrigin(&self) -> DOMString {
|
||||
pub fn CrossOrigin(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetCrossOrigin(&mut self, _cross_origin: &DOMString) -> ErrorResult {
|
||||
pub fn SetCrossOrigin(&mut self, _cross_origin: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Text(&self) -> DOMString {
|
||||
pub fn Text(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetText(&mut self, _text: &DOMString) -> ErrorResult {
|
||||
pub fn SetText(&mut self, _text: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Event(&self) -> DOMString {
|
||||
pub fn Event(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetEvent(&mut self, _event: &DOMString) -> ErrorResult {
|
||||
pub fn SetEvent(&mut self, _event: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn HtmlFor(&self) -> DOMString {
|
||||
pub fn HtmlFor(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetHtmlFor(&mut self, _html_for: &DOMString) -> ErrorResult {
|
||||
pub fn SetHtmlFor(&mut self, _html_for: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
|
|
@ -56,11 +56,11 @@ impl HTMLSelectElement {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Name(&self) -> DOMString {
|
||||
pub fn Name(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetName(&mut self, _name: &DOMString) -> ErrorResult {
|
||||
pub fn SetName(&mut self, _name: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
@ -80,7 +80,7 @@ impl HTMLSelectElement {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Type(&self) -> DOMString {
|
||||
pub fn Type(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
|
@ -96,7 +96,7 @@ impl HTMLSelectElement {
|
|||
None
|
||||
}
|
||||
|
||||
pub fn NamedItem(&self, _name: &DOMString) -> Option<AbstractNode<ScriptView>> {
|
||||
pub fn NamedItem(&self, _name: &Option<DOMString>) -> Option<AbstractNode<ScriptView>> {
|
||||
None
|
||||
}
|
||||
|
||||
|
@ -122,11 +122,11 @@ impl HTMLSelectElement {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Value(&self) -> DOMString {
|
||||
pub fn Value(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetValue(&mut self, _value: &DOMString) {
|
||||
pub fn SetValue(&mut self, _value: &Option<DOMString>) {
|
||||
}
|
||||
|
||||
pub fn WillValidate(&self) -> bool {
|
||||
|
@ -144,11 +144,11 @@ impl HTMLSelectElement {
|
|||
pub fn SetValidity(&mut self, _validity: @mut ValidityState) {
|
||||
}
|
||||
|
||||
pub fn ValidationMessage(&self) -> DOMString {
|
||||
pub fn ValidationMessage(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetValidationMessage(&mut self, _message: &DOMString) -> ErrorResult {
|
||||
pub fn SetValidationMessage(&mut self, _message: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
@ -156,6 +156,6 @@ impl HTMLSelectElement {
|
|||
true
|
||||
}
|
||||
|
||||
pub fn SetCustomValidity(&mut self, _error: &DOMString) {
|
||||
pub fn SetCustomValidity(&mut self, _error: &Option<DOMString>) {
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,27 +27,27 @@ impl HTMLSourceElement {
|
|||
}
|
||||
|
||||
impl HTMLSourceElement {
|
||||
pub fn Src(&self) -> DOMString {
|
||||
pub fn Src(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetSrc(&mut self, _src: &DOMString) -> ErrorResult {
|
||||
pub fn SetSrc(&mut self, _src: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Type(&self) -> DOMString {
|
||||
pub fn Type(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetType(&mut self, _type: &DOMString) -> ErrorResult {
|
||||
pub fn SetType(&mut self, _type: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Media(&self) -> DOMString {
|
||||
pub fn Media(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetMedia(&mut self, _media: &DOMString) -> ErrorResult {
|
||||
pub fn SetMedia(&mut self, _media: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
|
|
@ -34,19 +34,19 @@ impl HTMLStyleElement {
|
|||
pub fn SetDisabled(&self, _disabled: bool) {
|
||||
}
|
||||
|
||||
pub fn Media(&self) -> DOMString {
|
||||
pub fn Media(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetMedia(&mut self, _media: &DOMString) -> ErrorResult {
|
||||
pub fn SetMedia(&mut self, _media: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Type(&self) -> DOMString {
|
||||
pub fn Type(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetType(&mut self, _type: &DOMString) -> ErrorResult {
|
||||
pub fn SetType(&mut self, _type: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
|
|
@ -27,11 +27,11 @@ impl HTMLTableCaptionElement {
|
|||
}
|
||||
|
||||
impl HTMLTableCaptionElement {
|
||||
pub fn Align(&self) -> DOMString {
|
||||
pub fn Align(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetAlign(&mut self, _align: &DOMString) -> ErrorResult {
|
||||
pub fn SetAlign(&mut self, _align: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
|
|
@ -36,11 +36,11 @@ impl HTMLTableCellElement {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Headers(&self) -> DOMString {
|
||||
pub fn Headers(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetHeaders(&self, _headers: &DOMString) -> ErrorResult {
|
||||
pub fn SetHeaders(&self, _headers: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
@ -52,67 +52,67 @@ impl HTMLTableCellElement {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Abbr(&self) -> DOMString {
|
||||
pub fn Abbr(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetAbbr(&self, _abbr: &DOMString) -> ErrorResult {
|
||||
pub fn SetAbbr(&self, _abbr: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Scope(&self) -> DOMString {
|
||||
pub fn Scope(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetScope(&self, _abbr: &DOMString) -> ErrorResult {
|
||||
pub fn SetScope(&self, _abbr: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Align(&self) -> DOMString {
|
||||
pub fn Align(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetAlign(&self, _align: &DOMString) -> ErrorResult {
|
||||
pub fn SetAlign(&self, _align: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Axis(&self) -> DOMString {
|
||||
pub fn Axis(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetAxis(&self, _axis: &DOMString) -> ErrorResult {
|
||||
pub fn SetAxis(&self, _axis: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Height(&self) -> DOMString {
|
||||
pub fn Height(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetHeight(&self, _height: &DOMString) -> ErrorResult {
|
||||
pub fn SetHeight(&self, _height: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Width(&self) -> DOMString {
|
||||
pub fn Width(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetWidth(&self, _width: &DOMString) -> ErrorResult {
|
||||
pub fn SetWidth(&self, _width: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Ch(&self) -> DOMString {
|
||||
pub fn Ch(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetCh(&self, _ch: &DOMString) -> ErrorResult {
|
||||
pub fn SetCh(&self, _ch: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn ChOff(&self) -> DOMString {
|
||||
pub fn ChOff(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetChOff(&self, _ch_off: &DOMString) -> ErrorResult {
|
||||
pub fn SetChOff(&self, _ch_off: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
@ -124,19 +124,19 @@ impl HTMLTableCellElement {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
pub fn VAlign(&self) -> DOMString {
|
||||
pub fn VAlign(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetVAlign(&self, _valign: &DOMString) -> ErrorResult {
|
||||
pub fn SetVAlign(&self, _valign: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn BgColor(&self) -> DOMString {
|
||||
pub fn BgColor(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetBgColor(&self, _bg_color: &DOMString) -> ErrorResult {
|
||||
pub fn SetBgColor(&self, _bg_color: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
|
|
@ -35,43 +35,43 @@ impl HTMLTableColElement {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Align(&self) -> DOMString {
|
||||
pub fn Align(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetAlign(&mut self, _align: &DOMString) -> ErrorResult {
|
||||
pub fn SetAlign(&mut self, _align: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Ch(&self) -> DOMString {
|
||||
pub fn Ch(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetCh(&mut self, _ch: &DOMString) -> ErrorResult {
|
||||
pub fn SetCh(&mut self, _ch: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn ChOff(&self) -> DOMString {
|
||||
pub fn ChOff(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetChOff(&mut self, _ch_off: &DOMString) -> ErrorResult {
|
||||
pub fn SetChOff(&mut self, _ch_off: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn VAlign(&self) -> DOMString {
|
||||
pub fn VAlign(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetVAlign(&mut self, _v_align: &DOMString) -> ErrorResult {
|
||||
pub fn SetVAlign(&mut self, _v_align: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Width(&self) -> DOMString {
|
||||
pub fn Width(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetWidth(&mut self, _width: &DOMString) -> ErrorResult {
|
||||
pub fn SetWidth(&mut self, _width: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
|
|
@ -50,75 +50,75 @@ impl HTMLTableElement {
|
|||
pub fn StopSorting(&self) {
|
||||
}
|
||||
|
||||
pub fn Align(&self) -> DOMString {
|
||||
pub fn Align(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetAlign(&self, _align: &DOMString) -> ErrorResult {
|
||||
pub fn SetAlign(&self, _align: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Border(&self) -> DOMString {
|
||||
pub fn Border(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetBorder(&self, _border: &DOMString) -> ErrorResult {
|
||||
pub fn SetBorder(&self, _border: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Frame(&self) -> DOMString {
|
||||
pub fn Frame(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetFrame(&self, _frame: &DOMString) -> ErrorResult {
|
||||
pub fn SetFrame(&self, _frame: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Rules(&self) -> DOMString {
|
||||
pub fn Rules(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetRules(&self, _rules: &DOMString) -> ErrorResult {
|
||||
pub fn SetRules(&self, _rules: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Summary(&self) -> DOMString {
|
||||
pub fn Summary(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetSummary(&self, _summary: &DOMString) -> ErrorResult {
|
||||
pub fn SetSummary(&self, _summary: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Width(&self) -> DOMString {
|
||||
pub fn Width(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetWidth(&self, _width: &DOMString) -> ErrorResult {
|
||||
pub fn SetWidth(&self, _width: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn BgColor(&self) -> DOMString {
|
||||
pub fn BgColor(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetBgColor(&self, _bg_color: &DOMString) -> ErrorResult {
|
||||
pub fn SetBgColor(&self, _bg_color: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn CellPadding(&self) -> DOMString {
|
||||
pub fn CellPadding(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetCellPadding(&self, _cell_padding: &DOMString) -> ErrorResult {
|
||||
pub fn SetCellPadding(&self, _cell_padding: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn CellSpacing(&self) -> DOMString {
|
||||
pub fn CellSpacing(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetCellSpacing(&self, _cell_spacing: &DOMString) -> ErrorResult {
|
||||
pub fn SetCellSpacing(&self, _cell_spacing: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
|
|
@ -47,43 +47,43 @@ impl HTMLTableRowElement {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Align(&self) -> DOMString {
|
||||
pub fn Align(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetAlign(&self, _align: &DOMString) -> ErrorResult {
|
||||
pub fn SetAlign(&self, _align: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Ch(&self) -> DOMString {
|
||||
pub fn Ch(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetCh(&self, _ch: &DOMString) -> ErrorResult {
|
||||
pub fn SetCh(&self, _ch: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn ChOff(&self) -> DOMString {
|
||||
pub fn ChOff(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetChOff(&self, _ch_off: &DOMString) -> ErrorResult {
|
||||
pub fn SetChOff(&self, _ch_off: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn VAlign(&self) -> DOMString {
|
||||
pub fn VAlign(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetVAlign(&self, _v_align: &DOMString) -> ErrorResult {
|
||||
pub fn SetVAlign(&self, _v_align: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn BgColor(&self) -> DOMString {
|
||||
pub fn BgColor(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetBgColor(&self, _bg_color: &DOMString) -> ErrorResult {
|
||||
pub fn SetBgColor(&self, _bg_color: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
|
|
@ -31,35 +31,35 @@ impl HTMLTableSectionElement {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Align(&self) -> DOMString {
|
||||
pub fn Align(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetAlign(&mut self, _align: &DOMString) -> ErrorResult {
|
||||
pub fn SetAlign(&mut self, _align: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Ch(&self) -> DOMString {
|
||||
pub fn Ch(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetCh(&mut self, _ch: &DOMString) -> ErrorResult {
|
||||
pub fn SetCh(&mut self, _ch: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn ChOff(&self) -> DOMString {
|
||||
pub fn ChOff(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetChOff(&mut self, _ch_off: &DOMString) -> ErrorResult {
|
||||
pub fn SetChOff(&mut self, _ch_off: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn VAlign(&self) -> DOMString {
|
||||
pub fn VAlign(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetVAlign(&mut self, _v_align: &DOMString) -> ErrorResult {
|
||||
pub fn SetVAlign(&mut self, _v_align: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
|
|
@ -59,19 +59,19 @@ impl HTMLTextAreaElement {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Name(&self) -> DOMString {
|
||||
pub fn Name(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetName(&mut self, _name: &DOMString) -> ErrorResult {
|
||||
pub fn SetName(&mut self, _name: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Placeholder(&self) -> DOMString {
|
||||
pub fn Placeholder(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetPlaceholder(&mut self, _placeholder: &DOMString) -> ErrorResult {
|
||||
pub fn SetPlaceholder(&mut self, _placeholder: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
@ -99,34 +99,34 @@ impl HTMLTextAreaElement {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Wrap(&self) -> DOMString {
|
||||
pub fn Wrap(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetWrap(&mut self, _wrap: &DOMString) -> ErrorResult {
|
||||
pub fn SetWrap(&mut self, _wrap: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Type(&self) -> DOMString {
|
||||
pub fn Type(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetType(&mut self, _type: &DOMString) {
|
||||
pub fn SetType(&mut self, _type: &Option<DOMString>) {
|
||||
}
|
||||
|
||||
pub fn DefaultValue(&self) -> DOMString {
|
||||
pub fn DefaultValue(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetDefaultValue(&mut self, _default_value: &DOMString) -> ErrorResult {
|
||||
pub fn SetDefaultValue(&mut self, _default_value: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Value(&self) -> DOMString {
|
||||
pub fn Value(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetValue(&mut self, _value: &DOMString) {
|
||||
pub fn SetValue(&mut self, _value: &Option<DOMString>) {
|
||||
}
|
||||
|
||||
pub fn TextLength(&self) -> u32 {
|
||||
|
@ -145,7 +145,7 @@ impl HTMLTextAreaElement {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
pub fn ValidationMessage(&self) -> DOMString {
|
||||
pub fn ValidationMessage(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
|
@ -153,7 +153,7 @@ impl HTMLTextAreaElement {
|
|||
false
|
||||
}
|
||||
|
||||
pub fn SetCustomValidity(&self, _error: &DOMString) {
|
||||
pub fn SetCustomValidity(&self, _error: &Option<DOMString>) {
|
||||
}
|
||||
|
||||
pub fn Select(&self) {
|
||||
|
@ -175,14 +175,14 @@ impl HTMLTextAreaElement {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
pub fn GetSelectionDirection(&self) -> Fallible<DOMString> {
|
||||
pub fn GetSelectionDirection(&self) -> Fallible<Option<DOMString>> {
|
||||
Ok(None)
|
||||
}
|
||||
|
||||
pub fn SetSelectionDirection(&self, _selection_direction: &DOMString) -> ErrorResult {
|
||||
pub fn SetSelectionDirection(&self, _selection_direction: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn SetRangeText(&self, _replacement: &DOMString) {
|
||||
pub fn SetRangeText(&self, _replacement: &Option<DOMString>) {
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,11 +27,11 @@ impl HTMLTimeElement {
|
|||
}
|
||||
|
||||
impl HTMLTimeElement {
|
||||
pub fn DateTime(&self) -> DOMString {
|
||||
pub fn DateTime(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetDateTime(&mut self, _dateTime: &DOMString) -> ErrorResult {
|
||||
pub fn SetDateTime(&mut self, _dateTime: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,11 +27,11 @@ impl HTMLTitleElement {
|
|||
}
|
||||
|
||||
impl HTMLTitleElement {
|
||||
pub fn Text(&self) -> DOMString {
|
||||
pub fn Text(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetText(&mut self, _text: &DOMString) -> ErrorResult {
|
||||
pub fn SetText(&mut self, _text: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,35 +27,35 @@ impl HTMLTrackElement {
|
|||
}
|
||||
|
||||
impl HTMLTrackElement {
|
||||
pub fn Kind(&self) -> DOMString {
|
||||
pub fn Kind(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetKind(&mut self, _kind: &DOMString) -> ErrorResult {
|
||||
pub fn SetKind(&mut self, _kind: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Src(&self) -> DOMString {
|
||||
pub fn Src(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetSrc(&mut self, _src: &DOMString) -> ErrorResult {
|
||||
pub fn SetSrc(&mut self, _src: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Srclang(&self) -> DOMString {
|
||||
pub fn Srclang(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetSrclang(&mut self, _srclang: &DOMString) -> ErrorResult {
|
||||
pub fn SetSrclang(&mut self, _srclang: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Label(&self) -> DOMString {
|
||||
pub fn Label(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetLabel(&mut self, _label: &DOMString) -> ErrorResult {
|
||||
pub fn SetLabel(&mut self, _label: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
|
|
@ -35,11 +35,11 @@ impl HTMLUListElement {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
pub fn Type(&self) -> DOMString {
|
||||
pub fn Type(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetType(&mut self, _type: &DOMString) -> ErrorResult {
|
||||
pub fn SetType(&mut self, _type: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
|
|
@ -51,11 +51,11 @@ impl HTMLVideoElement {
|
|||
0
|
||||
}
|
||||
|
||||
pub fn Poster(&self) -> DOMString {
|
||||
pub fn Poster(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetPoster(&mut self, _poster: &DOMString) -> ErrorResult {
|
||||
pub fn SetPoster(&mut self, _poster: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
|
|
@ -49,7 +49,7 @@ impl MouseEvent {
|
|||
}
|
||||
|
||||
pub fn Constructor(owner: @mut Window,
|
||||
type_: &DOMString,
|
||||
type_: &Option<DOMString>,
|
||||
init: &MouseEventBinding::MouseEventInit) -> Fallible<AbstractEvent> {
|
||||
let ev = MouseEvent::new(owner);
|
||||
ev.mut_mouseevent().InitMouseEvent(type_, init.bubbles, init.cancelable, init.view,
|
||||
|
@ -105,13 +105,13 @@ impl MouseEvent {
|
|||
self.related_target
|
||||
}
|
||||
|
||||
pub fn GetModifierState(&self, _keyArg: &DOMString) -> bool {
|
||||
pub fn GetModifierState(&self, _keyArg: &Option<DOMString>) -> bool {
|
||||
//TODO
|
||||
false
|
||||
}
|
||||
|
||||
pub fn InitMouseEvent(&mut self,
|
||||
typeArg: &DOMString,
|
||||
typeArg: &Option<DOMString>,
|
||||
canBubbleArg: bool,
|
||||
cancelableArg: bool,
|
||||
viewArg: Option<@mut WindowProxy>,
|
||||
|
|
|
@ -17,7 +17,7 @@ pub enum Namespace {
|
|||
}
|
||||
|
||||
impl Namespace {
|
||||
pub fn from_str(url: &DOMString) -> Namespace {
|
||||
pub fn from_str(url: &Option<DOMString>) -> Namespace {
|
||||
match null_str_as_empty_ref(url) {
|
||||
&"http://www.w3.org/1999/xhtml" => HTML,
|
||||
&"http://www.w3.org/XML/1998/namespace" => XML,
|
||||
|
@ -29,7 +29,7 @@ impl Namespace {
|
|||
ns => Other(ns.to_owned())
|
||||
}
|
||||
}
|
||||
pub fn to_str(&self) -> DOMString {
|
||||
pub fn to_str(&self) -> Option<DOMString> {
|
||||
match *self {
|
||||
Null => None,
|
||||
HTML => Some(~"http://www.w3.org/1999/xhtml"),
|
||||
|
|
|
@ -22,23 +22,23 @@ impl Navigator {
|
|||
reflect_dom_object(@mut Navigator::new_inherited(), window, NavigatorBinding::Wrap)
|
||||
}
|
||||
|
||||
pub fn DoNotTrack(&self) -> DOMString {
|
||||
pub fn DoNotTrack(&self) -> Option<DOMString> {
|
||||
Some(~"unspecified")
|
||||
}
|
||||
|
||||
pub fn Vendor(&self) -> DOMString {
|
||||
pub fn Vendor(&self) -> Option<DOMString> {
|
||||
Some(~"") // Like Gecko
|
||||
}
|
||||
|
||||
pub fn VendorSub(&self) -> DOMString {
|
||||
pub fn VendorSub(&self) -> Option<DOMString> {
|
||||
Some(~"") // Like Gecko
|
||||
}
|
||||
|
||||
pub fn Product(&self) -> DOMString {
|
||||
pub fn Product(&self) -> Option<DOMString> {
|
||||
Some(~"Gecko") // This is supposed to be constant, see webidl.
|
||||
}
|
||||
|
||||
pub fn ProductSub(&self) -> DOMString {
|
||||
pub fn ProductSub(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
|
@ -46,7 +46,7 @@ impl Navigator {
|
|||
false
|
||||
}
|
||||
|
||||
pub fn GetBuildID(&self) -> Fallible<DOMString> {
|
||||
pub fn GetBuildID(&self) -> Fallible<Option<DOMString>> {
|
||||
Ok(None)
|
||||
}
|
||||
|
||||
|
@ -58,27 +58,27 @@ impl Navigator {
|
|||
false
|
||||
}
|
||||
|
||||
pub fn AppName(&self) -> DOMString {
|
||||
pub fn AppName(&self) -> Option<DOMString> {
|
||||
Some(~"Netscape") // Like Gecko/Webkit
|
||||
}
|
||||
|
||||
pub fn GetAppCodeName(&self) -> Fallible<DOMString> {
|
||||
pub fn GetAppCodeName(&self) -> Fallible<Option<DOMString>> {
|
||||
Ok(Some(~"Mozilla")) // Like Gecko/Webkit
|
||||
}
|
||||
|
||||
pub fn GetAppVersion(&self) -> Fallible<DOMString> {
|
||||
pub fn GetAppVersion(&self) -> Fallible<Option<DOMString>> {
|
||||
Ok(None)
|
||||
}
|
||||
|
||||
pub fn GetPlatform(&self) -> Fallible<DOMString> {
|
||||
pub fn GetPlatform(&self) -> Fallible<Option<DOMString>> {
|
||||
Ok(None)
|
||||
}
|
||||
|
||||
pub fn GetUserAgent(&self) -> Fallible<DOMString> {
|
||||
pub fn GetUserAgent(&self) -> Fallible<Option<DOMString>> {
|
||||
Ok(None)
|
||||
}
|
||||
|
||||
pub fn GetLanguage(&self) -> DOMString {
|
||||
pub fn GetLanguage(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
|
|
|
@ -561,7 +561,7 @@ impl Node<ScriptView> {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn NodeName(&self, abstract_self: AbstractNode<ScriptView>) -> DOMString {
|
||||
pub fn NodeName(&self, abstract_self: AbstractNode<ScriptView>) -> Option<DOMString> {
|
||||
Some(match self.type_id {
|
||||
ElementNodeTypeId(*) => {
|
||||
do abstract_self.with_imm_element |element| {
|
||||
|
@ -580,7 +580,7 @@ impl Node<ScriptView> {
|
|||
})
|
||||
}
|
||||
|
||||
pub fn GetBaseURI(&self) -> DOMString {
|
||||
pub fn GetBaseURI(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
|
@ -623,7 +623,7 @@ impl Node<ScriptView> {
|
|||
self.next_sibling
|
||||
}
|
||||
|
||||
pub fn GetNodeValue(&self, abstract_self: AbstractNode<ScriptView>) -> DOMString {
|
||||
pub fn GetNodeValue(&self, abstract_self: AbstractNode<ScriptView>) -> Option<DOMString> {
|
||||
match self.type_id {
|
||||
// ProcessingInstruction
|
||||
CommentNodeTypeId | TextNodeTypeId => {
|
||||
|
@ -637,11 +637,11 @@ impl Node<ScriptView> {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn SetNodeValue(&mut self, _abstract_self: AbstractNode<ScriptView>, _val: &DOMString) -> ErrorResult {
|
||||
pub fn SetNodeValue(&mut self, _abstract_self: AbstractNode<ScriptView>, _val: &Option<DOMString>) -> ErrorResult {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn GetTextContent(&self, abstract_self: AbstractNode<ScriptView>) -> DOMString {
|
||||
pub fn GetTextContent(&self, abstract_self: AbstractNode<ScriptView>) -> Option<DOMString> {
|
||||
match self.type_id {
|
||||
DocumentFragmentNodeTypeId | ElementNodeTypeId(*) => {
|
||||
let mut content = ~"";
|
||||
|
@ -939,7 +939,7 @@ impl Node<ScriptView> {
|
|||
|
||||
pub fn SetTextContent(&mut self,
|
||||
abstract_self: AbstractNode<ScriptView>,
|
||||
value: &DOMString) -> ErrorResult {
|
||||
value: &Option<DOMString>) -> ErrorResult {
|
||||
let is_empty = match value {
|
||||
&Some(~"") | &None => true,
|
||||
_ => false
|
||||
|
@ -1019,27 +1019,27 @@ impl Node<ScriptView> {
|
|||
false
|
||||
}
|
||||
|
||||
pub fn LookupPrefix(&self, _prefix: &DOMString) -> DOMString {
|
||||
pub fn LookupPrefix(&self, _prefix: &Option<DOMString>) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn LookupNamespaceURI(&self, _namespace: &DOMString) -> DOMString {
|
||||
pub fn LookupNamespaceURI(&self, _namespace: &Option<DOMString>) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn IsDefaultNamespace(&self, _namespace: &DOMString) -> bool {
|
||||
pub fn IsDefaultNamespace(&self, _namespace: &Option<DOMString>) -> bool {
|
||||
false
|
||||
}
|
||||
|
||||
pub fn GetNamespaceURI(&self) -> DOMString {
|
||||
pub fn GetNamespaceURI(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn GetPrefix(&self) -> DOMString {
|
||||
pub fn GetPrefix(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn GetLocalName(&self) -> DOMString {
|
||||
pub fn GetLocalName(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ impl Text {
|
|||
Node::reflect_node(@mut node, document, TextBinding::Wrap)
|
||||
}
|
||||
|
||||
pub fn Constructor(owner: @mut Window, text: &DOMString) -> Fallible<AbstractNode<ScriptView>> {
|
||||
pub fn Constructor(owner: @mut Window, text: &Option<DOMString>) -> Fallible<AbstractNode<ScriptView>> {
|
||||
Ok(Text::new(null_str_as_empty(text), owner.Document()))
|
||||
}
|
||||
|
||||
|
@ -34,7 +34,7 @@ impl Text {
|
|||
fail!("unimplemented")
|
||||
}
|
||||
|
||||
pub fn GetWholeText(&self) -> Fallible<DOMString> {
|
||||
pub fn GetWholeText(&self) -> Fallible<Option<DOMString>> {
|
||||
Ok(None)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -33,7 +33,7 @@ impl UIEvent {
|
|||
}
|
||||
|
||||
pub fn Constructor(owner: @mut Window,
|
||||
type_: &DOMString,
|
||||
type_: &Option<DOMString>,
|
||||
init: &UIEventBinding::UIEventInit) -> Fallible<AbstractEvent> {
|
||||
let ev = UIEvent::new(owner, UIEventTypeId);
|
||||
ev.mut_uievent().InitUIEvent(type_, init.parent.bubbles, init.parent.cancelable,
|
||||
|
@ -50,7 +50,7 @@ impl UIEvent {
|
|||
}
|
||||
|
||||
pub fn InitUIEvent(&mut self,
|
||||
type_: &DOMString,
|
||||
type_: &Option<DOMString>,
|
||||
can_bubble: bool,
|
||||
cancelable: bool,
|
||||
view: Option<@mut WindowProxy>,
|
||||
|
|
|
@ -72,7 +72,7 @@ pub struct TimerData {
|
|||
}
|
||||
|
||||
impl Window {
|
||||
pub fn Alert(&self, s: &DOMString) {
|
||||
pub fn Alert(&self, s: &Option<DOMString>) {
|
||||
// Right now, just print to the console
|
||||
println(format!("ALERT: {:s}", null_str_as_empty(s)));
|
||||
}
|
||||
|
@ -85,18 +85,18 @@ impl Window {
|
|||
self.page.frame.unwrap().document
|
||||
}
|
||||
|
||||
pub fn Name(&self) -> DOMString {
|
||||
pub fn Name(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetName(&self, _name: &DOMString) {
|
||||
pub fn SetName(&self, _name: &Option<DOMString>) {
|
||||
}
|
||||
|
||||
pub fn Status(&self) -> DOMString {
|
||||
pub fn Status(&self) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn SetStatus(&self, _status: &DOMString) {
|
||||
pub fn SetStatus(&self, _status: &Option<DOMString>) {
|
||||
}
|
||||
|
||||
pub fn Closed(&self) -> bool {
|
||||
|
@ -123,18 +123,18 @@ impl Window {
|
|||
self.navigator.unwrap()
|
||||
}
|
||||
|
||||
pub fn Confirm(&self, _message: &DOMString) -> bool {
|
||||
pub fn Confirm(&self, _message: &Option<DOMString>) -> bool {
|
||||
false
|
||||
}
|
||||
|
||||
pub fn Prompt(&self, _message: &DOMString, _default: &DOMString) -> DOMString {
|
||||
pub fn Prompt(&self, _message: &Option<DOMString>, _default: &Option<DOMString>) -> Option<DOMString> {
|
||||
None
|
||||
}
|
||||
|
||||
pub fn Print(&self) {
|
||||
}
|
||||
|
||||
pub fn ShowModalDialog(&self, _cx: *JSContext, _url: &DOMString, _argument: JSVal) -> JSVal {
|
||||
pub fn ShowModalDialog(&self, _cx: *JSContext, _url: &Option<DOMString>, _argument: JSVal) -> JSVal {
|
||||
JSVAL_NULL
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue