Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(91)

Unified Diff: sdk/lib/html/templates/html/impl/impl_HTMLInputElement.darttemplate

Issue 11692011: Fixing up input element support checks for IE9. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sdk/lib/html/dartium/html_dartium.dart ('k') | tests/html/html.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/html/templates/html/impl/impl_HTMLInputElement.darttemplate
diff --git a/sdk/lib/html/templates/html/impl/impl_HTMLInputElement.darttemplate b/sdk/lib/html/templates/html/impl/impl_HTMLInputElement.darttemplate
index 3da8b1766c7aa84c6d720fc04e8be12a2a499484..45da9bc6cf10bca8ead1f65790604525b06ff158 100644
--- a/sdk/lib/html/templates/html/impl/impl_HTMLInputElement.darttemplate
+++ b/sdk/lib/html/templates/html/impl/impl_HTMLInputElement.darttemplate
@@ -142,7 +142,13 @@ abstract class TextInputElementBase implements InputElementBase {
/**
* Similar to [TextInputElement], but on platforms where search is styled
* differently this will get the search style.
+ *
+ * Use [supported] to check if this is supported on the current platform.
*/
+@SupportedBrowser(SupportedBrowser.CHROME)
+@SupportedBrowser(SupportedBrowser.FIREFOX)
+@SupportedBrowser(SupportedBrowser.IE, '10')
+@SupportedBrowser(SupportedBrowser.SAFARI)
abstract class SearchInputElement implements TextInputElementBase {
factory SearchInputElement() => new InputElement(type: 'search');
@@ -151,6 +157,11 @@ abstract class SearchInputElement implements TextInputElementBase {
/// @domName HTMLInputElement.list;
Element get list;
+
+ /// Returns true if this input type is supported on the current platform.
+ static bool get supported {
+ return (new InputElement(type: 'search')).type == 'search';
+ }
}
/**
@@ -168,12 +179,23 @@ abstract class TextInputElement implements TextInputElementBase {
/**
* A control for editing an absolute URL.
+ *
+ * Use [supported] to check if this is supported on the current platform.
*/
+@SupportedBrowser(SupportedBrowser.CHROME)
+@SupportedBrowser(SupportedBrowser.FIREFOX)
+@SupportedBrowser(SupportedBrowser.IE, '10')
+@SupportedBrowser(SupportedBrowser.SAFARI)
abstract class UrlInputElement implements TextInputElementBase {
factory UrlInputElement() => new InputElement(type: 'url');
/// @domName HTMLInputElement.list;
Element get list;
+
+ /// Returns true if this input type is supported on the current platform.
+ static bool get supported {
+ return (new InputElement(type: 'url')).type == 'url';
+ }
}
/**
@@ -181,17 +203,34 @@ abstract class UrlInputElement implements TextInputElementBase {
*
* This provides a single line of text with minimal formatting help since
* there is a wide variety of telephone numbers.
+ *
+ * Use [supported] to check if this is supported on the current platform.
*/
+@SupportedBrowser(SupportedBrowser.CHROME)
+@SupportedBrowser(SupportedBrowser.FIREFOX)
+@SupportedBrowser(SupportedBrowser.IE, '10')
+@SupportedBrowser(SupportedBrowser.SAFARI)
abstract class TelephoneInputElement implements TextInputElementBase {
factory TelephoneInputElement() => new InputElement(type: 'tel');
/// @domName HTMLInputElement.list;
Element get list;
+
+ /// Returns true if this input type is supported on the current platform.
+ static bool get supported {
+ return (new InputElement(type: 'tel')).type == 'tel';
+ }
}
/**
* An e-mail address or list of e-mail addresses.
+ *
+ * Use [supported] to check if this is supported on the current platform.
*/
+@SupportedBrowser(SupportedBrowser.CHROME)
+@SupportedBrowser(SupportedBrowser.FIREFOX)
+@SupportedBrowser(SupportedBrowser.IE, '10')
+@SupportedBrowser(SupportedBrowser.SAFARI)
abstract class EmailInputElement implements TextInputElementBase {
factory EmailInputElement() => new InputElement(type: 'email');
@@ -224,6 +263,11 @@ abstract class EmailInputElement implements TextInputElementBase {
/// @domName HTMLInputElement.size
int size;
+
+ /// Returns true if this input type is supported on the current platform.
+ static bool get supported {
+ return (new InputElement(type: 'email')).type == 'email';
+ }
}
/**
« no previous file with comments | « sdk/lib/html/dartium/html_dartium.dart ('k') | tests/html/html.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698