Documenting misleading DataTransfer API.

BUG=

Review URL: https://codereview.chromium.org//12092114

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21216 260f80e4-7a28-3924-810f-c04153c831b5
This commit is contained in:
blois@google.com 2013-04-10 16:22:14 +00:00
parent 70ccbd02aa
commit 16ba7bbc02
3 changed files with 54 additions and 0 deletions

View file

@ -5546,6 +5546,22 @@ class DataTransfer native "*Clipboard" {
@DocsEditable
void clearData([String type]) native;
/**
* Gets the data for the specified type.
*
* The data is only available from within a drop operation (such as an
* [Element.onDrop] event) and will return `null` before the event is
* triggered.
*
* Data transfer is prohibited across domains. If a drag originates
* from content from another domain or protocol (HTTP vs HTTPS) then the
* data cannot be accessed.
*
* The [type] can have values such as:
*
* * `'Text'`
* * `'URL'`
*/
@DomName('Clipboard.getData')
@DocsEditable
String getData(String type) native;

View file

@ -6042,6 +6042,22 @@ class DataTransfer extends NativeFieldWrapperClass1 {
@DocsEditable
void clearData([String type]) native "Clipboard_clearData_Callback";
/**
* Gets the data for the specified type.
*
* The data is only available from within a drop operation (such as an
* [Element.onDrop] event) and will return `null` before the event is
* triggered.
*
* Data transfer is prohibited across domains. If a drag originates
* from content from another domain or protocol (HTTP vs HTTPS) then the
* data cannot be accessed.
*
* The [type] can have values such as:
*
* * `'Text'`
* * `'URL'`
*/
@DomName('Clipboard.getData')
@DocsEditable
String getData(String type) native "Clipboard_getData_Callback";

View file

@ -92,6 +92,28 @@
]
}
},
"Clipboard": {
"members": {
"getData": [
"/**",
" * Gets the data for the specified type.",
" *",
" * The data is only available from within a drop operation (such as an",
" * [Element.onDrop] event) and will return `null` before the event is",
" * triggered.",
" *",
" * Data transfer is prohibited across domains. If a drag originates",
" * from content from another domain or protocol (HTTP vs HTTPS) then the",
" * data cannot be accessed.",
" *",
" * The [type] can have values such as:",
" *",
" * * `'Text'`",
" * * `'URL'`",
" */"
]
}
},
"Document": {
"members": {
"body": [