From 5246a99f224ece680e8c468d987091749167813c Mon Sep 17 00:00:00 2001 From: Jon Dufresne Date: Mon, 18 May 2020 15:31:49 -0700 Subject: [PATCH] Replace .getAttribute() calls with the appropriate element property --- debug_toolbar/static/debug_toolbar/js/toolbar.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/debug_toolbar/static/debug_toolbar/js/toolbar.js b/debug_toolbar/static/debug_toolbar/js/toolbar.js index 49e31aac4..a542af6d4 100644 --- a/debug_toolbar/static/debug_toolbar/js/toolbar.js +++ b/debug_toolbar/static/debug_toolbar/js/toolbar.js @@ -109,16 +109,16 @@ if (this.tagName === 'BUTTON') { const form = this.closest('form'); - ajax_data.url = this.getAttribute('formaction'); + ajax_data.url = this.formAction; if (form) { ajax_data.body = new FormData(form); - ajax_data.method = form.getAttribute('method') || 'POST'; + ajax_data.method = form.method.toUpperCase(); } } if (this.tagName === 'A') { - ajax_data.url = this.getAttribute('href'); + ajax_data.url = this.href; } ajax(ajax_data.url, ajax_data).then(function(body) {