forked from mirrors/gecko-dev
		
	 d5038d123e
			
		
	
	
		d5038d123e
		
	
	
	
	
		
			
			This frees us forever from caring about maintaining these enums. The last commit removes their use from the initialisation of interface objects derived from Node. Source-Repo: https://github.com/servo/servo Source-Revision: 32daa17d5cbcad02db0713e21e52410cdc60480e
		
			
				
	
	
		
			38 lines
		
	
	
	
		
			1.4 KiB
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			38 lines
		
	
	
	
		
			1.4 KiB
		
	
	
	
		
			Rust
		
	
	
	
	
	
| /* This Source Code Form is subject to the terms of the Mozilla Public
 | |
|  * License, v. 2.0. If a copy of the MPL was not distributed with this
 | |
|  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 | |
| 
 | |
| use dom::bindings::codegen::Bindings::XMLHttpRequestUploadBinding;
 | |
| use dom::bindings::codegen::InheritTypes::EventTargetTypeId;
 | |
| use dom::bindings::codegen::InheritTypes::XMLHttpRequestEventTargetTypeId;
 | |
| use dom::bindings::codegen::InheritTypes::XMLHttpRequestUploadDerived;
 | |
| use dom::bindings::global::GlobalRef;
 | |
| use dom::bindings::js::Root;
 | |
| use dom::bindings::utils::reflect_dom_object;
 | |
| use dom::eventtarget::EventTarget;
 | |
| use dom::xmlhttprequesteventtarget::XMLHttpRequestEventTarget;
 | |
| 
 | |
| #[dom_struct]
 | |
| pub struct XMLHttpRequestUpload {
 | |
|     eventtarget: XMLHttpRequestEventTarget
 | |
| }
 | |
| 
 | |
| impl XMLHttpRequestUpload {
 | |
|     fn new_inherited() -> XMLHttpRequestUpload {
 | |
|         XMLHttpRequestUpload {
 | |
|             eventtarget: XMLHttpRequestEventTarget::new_inherited(),
 | |
|         }
 | |
|     }
 | |
|     pub fn new(global: GlobalRef) -> Root<XMLHttpRequestUpload> {
 | |
|         reflect_dom_object(box XMLHttpRequestUpload::new_inherited(),
 | |
|                            global,
 | |
|                            XMLHttpRequestUploadBinding::Wrap)
 | |
|     }
 | |
| }
 | |
| 
 | |
| impl XMLHttpRequestUploadDerived for EventTarget {
 | |
|     fn is_xmlhttprequestupload(&self) -> bool {
 | |
|         *self.type_id() ==
 | |
|             EventTargetTypeId::XMLHttpRequestEventTarget(XMLHttpRequestEventTargetTypeId::XMLHttpRequestUpload)
 | |
|     }
 | |
| }
 |