createShadowRoot method Null safety

  1. @SupportedBrowser(SupportedBrowser.CHROME, '25')
ShadowRoot createShadowRoot()

Creates a new shadow root for this shadow host.

Other resources

Implementation

@SupportedBrowser(SupportedBrowser.CHROME, '25')
ShadowRoot createShadowRoot() {
  return JS(
      'ShadowRoot',
      '(#.createShadowRoot || #.webkitCreateShadowRoot).call(#)',
      this,
      this,
      this);
}