Skip to content

Commit e714e53

Browse files
authored
Merge pull request #1281 from jdufresne/properties
Replace .getAttribute() calls with the appropriate element property
2 parents 799f585 + 5246a99 commit e714e53

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

debug_toolbar/static/debug_toolbar/js/toolbar.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,16 +109,16 @@
109109

110110
if (this.tagName === 'BUTTON') {
111111
const form = this.closest('form');
112-
ajax_data.url = this.getAttribute('formaction');
112+
ajax_data.url = this.formAction;
113113

114114
if (form) {
115115
ajax_data.body = new FormData(form);
116-
ajax_data.method = form.getAttribute('method') || 'POST';
116+
ajax_data.method = form.method.toUpperCase();
117117
}
118118
}
119119

120120
if (this.tagName === 'A') {
121-
ajax_data.url = this.getAttribute('href');
121+
ajax_data.url = this.href;
122122
}
123123

124124
ajax(ajax_data.url, ajax_data).then(function(body) {

0 commit comments

Comments
 (0)