Audit Chrome OS Settings UI for proper use of AllowJavascript |
|||||
Issue descriptionThere are several anti-patterns for the use of AllowJavascript in CrOS Settings WebUI handlers. We should fix these to follow the following guidelines: 1. In general, AllowJavascript should be called by C++ handlers that respond with a JS call (note: not in the response). This makes it clear that JS is allowed at a point when the Web UI is able to respond to the JS call. 2. If JS calls are invoked from observer methods, the WbeUI must make a JS call into the C++ code to indicate that it is ready (in Polymer this is typically in the attached() or ready() method). 2a. The handler method for the call should call AllowJavascrpt. 2b. The first AllowJavascrpt() call will trigger OnJavascriptallowed() which should set up any observers.
,
Sep 20 2017
,
Sep 22 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/da5a7041080e60743101357e2124a0e0073b00a9 commit da5a7041080e60743101357e2124a0e0073b00a9 Author: Steven Bennetts <stevenjb@chromium.org> Date: Fri Sep 22 15:57:00 2017 Settings: CrOS: Fix calls to JavascriptAllowed This addresses an issue raised in crrev.com/c/673748 Bug: 767157 Change-Id: I6cf66a152cadea1198abb03224311a851c139e02 Reviewed-on: https://chromium-review.googlesource.com/676087 Commit-Queue: Steven Bennetts <stevenjb@chromium.org> Reviewed-by: Yury Khmel <khmel@chromium.org> Reviewed-by: Demetrios Papadopoulos <dpapad@chromium.org> Reviewed-by: Jacob Dufault <jdufault@chromium.org> Cr-Commit-Position: refs/heads/master@{#503750} [modify] https://crrev.com/da5a7041080e60743101357e2124a0e0073b00a9/chrome/browser/ui/webui/settings/chromeos/android_apps_handler.cc [modify] https://crrev.com/da5a7041080e60743101357e2124a0e0073b00a9/chrome/browser/ui/webui/settings/chromeos/device_stylus_handler.cc [modify] https://crrev.com/da5a7041080e60743101357e2124a0e0073b00a9/chrome/browser/ui/webui/settings/chromeos/device_stylus_handler.h [modify] https://crrev.com/da5a7041080e60743101357e2124a0e0073b00a9/chrome/browser/ui/webui/settings/chromeos/fingerprint_handler.cc
,
Sep 29 2017
,
Jan 22 2018
,
Jan 23 2018
|
|||||
►
Sign in to add a comment |
|||||
Comment 1 by dpa...@chromium.org
, Sep 20 2017