mojo/public/tools/bindings/generators/mojom_js_generator.py
def _GetWebUiModulePath(module):
  """Returns the path to a WebUI module, from the perspective of a WebUI page
  that makes it available. This is based on the corresponding mojom target's
  webui_module_path value. Returns None if the target specifies no module
  path. Otherwise, returned paths always end in a '/' and begin with either
  `_SHARED_MODULE_PREFIX` or a '/'."""
  path = module.metadata.get('webui_module_path')
  if path is None or path == '/':
    return path
  if path.startswith(_SHARED_MODULE_PREFIX):
    return path.rstrip('/') + '/'
  return '/{}/'.format(path.strip('/'))
Returns the path to a WebUI module, from the perspective of a WebUI page
  that makes it available. This is based on the corresponding mojom target's
  webui_module_path value. Returns None if the target specifies no module
  path. Otherwise, returned paths always end in a '/' and begin with either
  `_SHARED_MODULE_PREFIX` or a '/'.
Returns the path to a WebUI module, from the perspective of a WebUI page
that makes it available. This is based on the corresponding mojom target's
webui_module_path value. Returns None if the target specifies no module
path. Otherwise, returned paths always end in a '/' and begin with either
`_SHARED_MODULE_PREFIX` or a '/'.
Returns the path to a WebUI module from the perspective of a WebUI page that makes it available . This is based on the corresponding mojom target ' s webui_module_path value . Returns None if the target specifies no module path . Otherwise returned paths always end in a ' / ' and begin with either ` _SHARED_MODULE_PREFIX ` or a ' / ' .
def _GetWebUiModulePath(module):
  path = module.metadata.get('webui_module_path')
  if path is None or path == '/':
    return path
  if path.startswith(_SHARED_MODULE_PREFIX):
    return path.rstrip('/') + '/'
  return '/{}/'.format(path.strip('/'))
def _GetWebUiModulePath ( module ) : path = module . metadata . get ( 'webui_module_path' ) if path is None or path == '/' : return path if path . startswith ( _SHARED_MODULE_PREFIX ) : return path . rstrip ( '/' ) + '/' return '/{}/' . format ( path . strip ( '/' ) )
Returns the path to a WebUI module, from the perspective of a WebUI page
that makes it available.
Returns the path to a WebUI module from the perspective of a WebUI page that makes it available .
"""Returns the path to a WebUI module, from the perspective of a WebUI page
  that makes it available. This is based on the corresponding mojom target's
  webui_module_path value. Returns None if the target specifies no module
  path. Otherwise, returned paths always end in a '/' and begin with either
  `_SHARED_MODULE_PREFIX` or a '/'."""
module