Bug 1309296 - Get rid of uses of .contains() on a dataTransfer's .types in suite/ (port bug 1298243). r=frg, a=frg.
authorstefanh@inbox.com
Tue, 11 Oct 2016 21:10:23 +0200
changeset 20532 ee73c694f5ff7c26473adb6d2acbcbfcb45fd6f9
parent 20531 6d463070d845ed47088ee322e0bca4dc4bf12ae3
child 20533 fb3474301afa6f1956aa663a4538b136ce65903e
push id12394
push userstefanh@inbox.com
push dateTue, 11 Oct 2016 19:10:28 +0000
treeherdercomm-central@ee73c694f5ff [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfrg, frg
bugs1309296, 1298243
Bug 1309296 - Get rid of uses of .contains() on a dataTransfer's .types in suite/ (port bug 1298243). r=frg, a=frg.
suite/common/downloads/downloadmanager.js
suite/common/search/search.xml
--- a/suite/common/downloads/downloadmanager.js
+++ b/suite/common/downloads/downloadmanager.js
@@ -672,19 +672,19 @@ var gDownloadDNDObserver = {
   },
 
   onDragOver: function (aEvent)
   {
     if (disallowDrop(aEvent))
       return;
 
     var types = aEvent.dataTransfer.types;
-    if (types.contains("text/uri-list") ||
-        types.contains("text/x-moz-url") ||
-        types.contains("text/plain"))
+    if (types.includes("text/uri-list") ||
+        types.includes("text/x-moz-url") ||
+        types.includes("text/plain"))
       aEvent.preventDefault();
     aEvent.stopPropagation();
   },
 
   onDrop: function(aEvent)
   {
     if (disallowDrop(aEvent))
       return;
--- a/suite/common/search/search.xml
+++ b/suite/common/search/search.xml
@@ -611,17 +611,17 @@
         }.bind(this)
       })]]></field>
     </implementation>
 
     <handlers>
       <handler event="dragover">
       <![CDATA[
         var types = event.dataTransfer.types;
-        if (types.contains("text/plain") || types.contains("text/x-moz-text-internal"))
+        if (types.includes("text/plain") || types.includes("text/x-moz-text-internal"))
           event.preventDefault();
       ]]>
       </handler>
 
       <handler event="drop">
       <![CDATA[
         var dataTransfer = event.dataTransfer;
         var data = dataTransfer.getData("text/plain");