This code fails with Firefox (e is a paste event):
h.DataTransfer data = e.clipboardData;
if (data.types.contains('text/html')) { ... }
Error: TypeError: t1.contains$1 is not a function
This looks like a bug in dart2js (getInterceptor does not recognize DOMStringList).
Using Firefox 49.0 and Dart 1.20.1.
I just ran into the same thing, I'm not seeing a way to even work around it when we know we're running in Firefox either. data.types prints to the console as [Object DOMStringList] which is the JS type, can't be cast to the Dart DomStringList type.
fwiw, you can still query for specific known formats so if you know you're interested in plain text or HTML, that is still doable
Most helpful comment
I just ran into the same thing, I'm not seeing a way to even work around it when we know we're running in Firefox either.
data.typesprints to the console as [Object DOMStringList] which is the JS type, can't be cast to the Dart DomStringList type.