getLineDash method Null safety

  1. @SupportedBrowser(SupportedBrowser.CHROME)
  2. @SupportedBrowser(SupportedBrowser.SAFARI)
  3. @SupportedBrowser(SupportedBrowser.IE, '11')
  4. @Unstable()
List<num> getLineDash ()
@SupportedBrowser(SupportedBrowser.CHROME), @SupportedBrowser(SupportedBrowser.IE, '11'), @SupportedBrowser(SupportedBrowser.SAFARI), @Unstable()

Implementation

@SupportedBrowser(SupportedBrowser.CHROME)
@SupportedBrowser(SupportedBrowser.SAFARI)
@SupportedBrowser(SupportedBrowser.IE, '11')
@Unstable()
List<num> getLineDash() {
  // TODO(14316): Firefox has this functionality with mozDash, but it's a bit
  // different.
  if (JS('bool', '!!#.getLineDash', this)) {
    return JS('List<num>', '#.getLineDash()', this);
  } else if (JS('bool', '!!#.webkitLineDash', this)) {
    return JS('List<num>', '#.webkitLineDash', this);
  }
  return [];
}