Fix decode feature detection in HtmlCodec (flutter/engine#13274)

This commit is contained in:
Ferhat
2019-10-22 15:07:39 -07:00
committed by GitHub
parent c108c0af17
commit 227d999468

View File

@@ -4,8 +4,11 @@
part of engine;
final bool _supportsDecode =
js_util.hasProperty(js.JsObject(js.context['Image']), 'decode');
final bool _supportsDecode = js_util.getProperty(
js_util.getProperty(
js_util.getProperty(html.window, 'Image'), 'prototype'),
'decode') !=
null;
class HtmlCodec implements ui.Codec {
final String src;