From ff82c4af6a493321d9eaec6ba8fa8589e4aa824d Mon Sep 17 00:00:00 2001 From: joerg1985 <16140691+joerg1985@users.noreply.github.com> Date: Wed, 10 Jan 2024 11:58:00 +0100 Subject: [PATCH] [atoms] minimize size of get-attribute atom (#13416) Co-authored-by: Diego Molina --- javascript/webdriver/atoms/BUILD.bazel | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/javascript/webdriver/atoms/BUILD.bazel b/javascript/webdriver/atoms/BUILD.bazel index 51e110f8aec33..67d55ad050b93 100644 --- a/javascript/webdriver/atoms/BUILD.bazel +++ b/javascript/webdriver/atoms/BUILD.bazel @@ -41,6 +41,20 @@ closure_js_library( ], ) +closure_js_library( + name = "attribute-only", + srcs = ["attribute.js"], + suppress = [ + "JSC_IMPLICITLY_NULLABLE_JSDOC", + "JSC_NULLABLE_RETURN_WITH_NAME", + ], + visibility = ["//visibility:private"], + deps = [ + "//javascript/atoms:domcore", + "@io_bazel_rules_closure//closure/library", + ], +) + closure_fragment( name = "clear-local-storage", function = "webdriver.atoms.storage.local.clear", @@ -83,7 +97,7 @@ closure_fragment( closure_fragment( name = "get-attribute", function = "webdriver.atoms.element.attribute.get", - module = "webdriver.atoms.element", + module = "webdriver.atoms.element.attribute", visibility = [ "//dotnet/src/webdriver:__pkg__", "//java/src/org/openqa/selenium/remote:__pkg__", @@ -94,7 +108,7 @@ closure_fragment( "//rb/lib/selenium/webdriver/atoms:__pkg__", ], deps = [ - ":atoms-lib", + ":attribute-only", ], )