Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue 12549 fix atoms generation lowdash #15247

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions javascript/private/fragment.bzl
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
load("@io_bazel_rules_closure//closure:defs.bzl", "closure_js_binary", "closure_js_library")

EXPORT_FUNCTION_NAME = "se_exportedFunctionSymbol"

def _internal_closure_fragment_export_impl(ctx):
ctx.actions.write(
output = ctx.outputs.out,
content = """
goog.require('%s');
goog.exportSymbol('_', %s);
""" % (ctx.attr.module, ctx.attr.function),
goog.exportSymbol('%s', %s);
""" % (ctx.attr.module, EXPORT_FUNCTION_NAME, ctx.attr.function),
)

_internal_closure_fragment_export = rule(
Expand Down Expand Up @@ -59,10 +61,7 @@ def closure_fragment(
# See http://code.google.com/p/selenium/issues/detail?id=1333
wrapper = (
"function(){" +
"return (function(){%output%; return this._.apply(null,arguments);}).apply({" +
"navigator:typeof window!='undefined'?window.navigator:null," +
"document:typeof window!='undefined'?window.document:null" +
"}, arguments);}"
"return (function(){%output%; return this." + EXPORT_FUNCTION_NAME + ".apply(null,arguments);}).apply(window, arguments);}"
)

browser_defs = {
Expand Down