web.dev icon indicating copy to clipboard operation
web.dev copied to clipboard

New layout patterns from GUI Challenges not allowing inline event handlers in prod

Open argyleink opened this issue 3 years ago • 2 comments

The add element button called a function inline onclick and the console is trying to alert me that's not ok per some guidelines. Task is to update the demo's to not use inline event handlers, so the demo functionality can work in localhost and production.

To Reproduce Steps to reproduce the behavior:

  1. Go to https://web.dev/patterns/layout/
  2. Expand "Autobot"
  3. Click the "Add element" button
  4. See error in console

Expected behavior An element to be added to the demo layout

Screenshots Screenshot 2022-08-02 10 41 15 AM

argyleink avatar Aug 02 '22 17:08 argyleink

thinks for letting me know .

On Tue, 2 Aug 2022 at 18:44, Adam Argyle @.***> wrote:

The add element button called a function inline onclick and the console is trying to alert me that's not ok per some guidelines. Task is to update the demo's to not use inline event handlers, so the demo functionality can work in localhost and production.

To Reproduce Steps to reproduce the behavior:

  1. Go to https://web.dev/patterns/layout/
  2. Expand "Autobot"
  3. Click the "Add element" button
  4. See error in console

Expected behavior An element to be added to the demo layout

Screenshots [image: Screenshot 2022-08-02 10 41 15 AM] https://user-images.githubusercontent.com/1134620/182439423-ba5a8c32-9d2a-4a4c-a28f-00931186c989.png

— Reply to this email directly, view it on GitHub https://github.com/GoogleChrome/web.dev/issues/8453, or unsubscribe https://github.com/notifications/unsubscribe-auth/AYRTV3JKEGERKRB57UGYK33VXFNBTANCNFSM55L7WYFA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

enu71 avatar Aug 02 '22 20:08 enu71

also Theme Switch

argyleink avatar Aug 08 '22 21:08 argyleink

fixed

argyleink avatar Aug 17 '22 17:08 argyleink