Skip to content

Commit

Permalink
Adding externs
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolasgarnier committed Sep 3, 2019
1 parent 3dac865 commit aa2b4c2
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 1 deletion.
2 changes: 1 addition & 1 deletion claat/render/template.html
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
<script src="{{.Prefix}}/codelab-elements/custom-elements.min.js"></script>
<script src="{{.Prefix}}/codelab-elements/prettify.js"></script>
<script src="{{.Prefix}}/codelab-elements/codelab-elements.js"></script>
<script type="text/javascript" src="//www.gstatic.com/feedback/api.js"></script>
<script src="//support.google.com/inapp/api.js"></script>

</body>
</html>
9 changes: 9 additions & 0 deletions codelab-elements/google-codelab/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,18 @@ closure_js_library(
deps = [
"@io_bazel_rules_closure//closure/library",
":google_codelab_soy",
":externs",
]
)

# Externs.
closure_js_library(
name = "externs",
srcs = [
"externs.js",
],
)

# Compiled version of GoogleCodelabStep element, suitable for distribution.
closure_js_binary(
name = "google_codelab_bin",
Expand Down
37 changes: 37 additions & 0 deletions codelab-elements/google-codelab/externs.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/**
* @license
* Copyright 2019 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

/**
* @fileoverview Externs to be included if you include Google Feedback API into
* your compiled JS code.
* @externs
*/

/**
* namespace
* @suppress {duplicate}
*/
var userfeedback = {};
userfeedback.api = {};


/**
* @param {Object} configuration Product configuration.
* @param {Object=} opt_productData Data about the product.
* @return {boolean} true if Feedback was loaded, false otherwise.
*/
userfeedback.api.startFeedback = function(configuration, opt_productData) {};

0 comments on commit aa2b4c2

Please sign in to comment.