Fix "Behavior must be global names..." error

This error is one of many showing up when you set
`compilation_mode="SIMPLE"`, so fixing it is a prerequisite for
turning on compilation:

ERROR - Behaviors must be global names or qualified names that are declared as object literals or array literals of other valid Behaviors.
      Gerrit.KeyboardShortcutBehavior,
      ^
  ProTip: "JSC_POLYMER_UNQUALIFIED_BEHAVIOR" can be added to the `suppress` attribute of:
  //polygerrit-ui/app:polygerrit_ui_closure_lib

Also adding a new entry point for gr-diff because we need to add the
`let Gerrit = ...` line somewhere at the root that is not imported
elsewhere.

Change-Id: I47a487e31d38855978e6a449aab5978edc050d6d
This commit is contained in:
Ole Rehmsen
2018-09-17 08:23:33 +02:00
parent d3a779a8b4
commit e70e678d90
3 changed files with 14 additions and 0 deletions

View File

@@ -0,0 +1,6 @@
<script>
// Needed for JSCompiler to understand it's global.
// eslint-disable-next-line no-unused-vars, prefer-const
let Gerrit = window.Gerrit || {};
</script>
<link rel="import" href="../elements/diff/gr-diff/gr-diff.html">