WebUI: Convert cr.defineProperty() to Object.defineProperty()
Change the use of cr.defineProperty() to Object.defineProperty() + type declaration. This is basically what Closure ChromePass was doing [1], but we don't want to depend on ChromePass when using JS modules. NOTE that this changes the property definition for both module and non-module versions, but they should have the same behaviour, because it uses the same getters and setters. [1] - https://github.com/google/closure-compiler/blob/master/test/com/google/javascript/jscomp/ChromePassTest.java#L415-L427 Bug: 1133198, 1134497 Change-Id: I787dc3d7f2fa8dc290f7839c76c347b5695a0038 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2440331 Commit-Queue: Luciano Pacheco <lucmult@chromium.org> Reviewed-by:dpapad <dpapad@chromium.org> Cr-Commit-Position: refs/heads/master@{#816527}
Showing
Please register or sign in to comment