OLD | NEW |
1 // DO NOT EDIT: auto-generated with `pub run custom_element_apigen:update` | 1 // DO NOT EDIT: auto-generated with `pub run custom_element_apigen:update` |
2 | 2 |
3 /// Dart API for the polymer element `iron_form`. | 3 /// Dart API for the polymer element `iron_form`. |
4 @HtmlImport('iron_form_nodart.html') | 4 @HtmlImport('iron_form_nodart.html') |
5 library polymer_elements.lib.src.iron_form.iron_form; | 5 library polymer_elements.lib.src.iron_form.iron_form; |
6 | 6 |
7 import 'dart:html'; | 7 import 'dart:html'; |
8 import 'dart:js' show JsArray, JsObject; | 8 import 'dart:js' show JsArray, JsObject; |
9 import 'package:web_components/web_components.dart'; | 9 import 'package:web_components/web_components.dart'; |
10 import 'package:polymer_interop/polymer_interop.dart'; | 10 import 'package:polymer_interop/polymer_interop.dart'; |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 set contentType(String value) { jsElement[r'contentType'] = value; } | 46 set contentType(String value) { jsElement[r'contentType'] = value; } |
47 | 47 |
48 /// By default, the form will display the browser's native validation | 48 /// By default, the form will display the browser's native validation |
49 /// UI (i.e. popup bubbles and invalid styles on invalid fields). You can | 49 /// UI (i.e. popup bubbles and invalid styles on invalid fields). You can |
50 /// manually disable this; however, if you do, note that you will have to | 50 /// manually disable this; however, if you do, note that you will have to |
51 /// manually style invalid *native* HTML fields yourself, as you are | 51 /// manually style invalid *native* HTML fields yourself, as you are |
52 /// explicitly preventing the native form from doing so. | 52 /// explicitly preventing the native form from doing so. |
53 bool get disableNativeValidationUi => jsElement[r'disableNativeValidationUi']; | 53 bool get disableNativeValidationUi => jsElement[r'disableNativeValidationUi']; |
54 set disableNativeValidationUi(bool value) { jsElement[r'disableNativeValidatio
nUi'] = value; } | 54 set disableNativeValidationUi(bool value) { jsElement[r'disableNativeValidatio
nUi'] = value; } |
55 | 55 |
| 56 /// HTTP request headers to send |
| 57 /// |
| 58 /// Note: setting a `Content-Type` header here will override the value |
| 59 /// specified by the `contentType` property of this element. |
| 60 get headers => jsElement[r'headers']; |
| 61 set headers(value) { jsElement[r'headers'] = (value is Map || (value is Iterab
le && value is! JsArray)) ? new JsObject.jsify(value) : value;} |
| 62 |
56 /// Set the withCredentials flag when sending data. | 63 /// Set the withCredentials flag when sending data. |
57 bool get withCredentials => jsElement[r'withCredentials']; | 64 bool get withCredentials => jsElement[r'withCredentials']; |
58 set withCredentials(bool value) { jsElement[r'withCredentials'] = value; } | 65 set withCredentials(bool value) { jsElement[r'withCredentials'] = value; } |
59 | 66 |
60 /// Returns a json object containing name/value pairs for all the registered | 67 /// Returns a json object containing name/value pairs for all the registered |
61 /// custom components and native elements of the form. If there are elements | 68 /// custom components and native elements of the form. If there are elements |
62 /// with duplicate names, then their values will get aggregated into an | 69 /// with duplicate names, then their values will get aggregated into an |
63 /// array of values. | 70 /// array of values. |
64 serialize() => | 71 serialize() => |
65 jsElement.callMethod('serialize', []); | 72 jsElement.callMethod('serialize', []); |
66 | 73 |
67 /// Called to submit the form. | 74 /// Called to submit the form. |
68 submit() => | 75 submit() => |
69 jsElement.callMethod('submit', []); | 76 jsElement.callMethod('submit', []); |
70 | 77 |
71 /// Validates all the required elements (custom and native) in the form. | 78 /// Validates all the required elements (custom and native) in the form. |
72 bool validate() => | 79 bool validate() => |
73 jsElement.callMethod('validate', []); | 80 jsElement.callMethod('validate', []); |
74 } | 81 } |
OLD | NEW |