Re: [Django] #31027: Prefer DOM object properties over Element.getAttribute() and Element.setAttribute().

2019-11-26 Thread Django
#31027: Prefer DOM object properties over Element.getAttribute() and
Element.setAttribute().
--+
 Reporter:  Jon Dufresne  |Owner:  nobody
 Type:  Cleanup/optimization  |   Status:  closed
Component:  contrib.admin |  Version:  master
 Severity:  Normal|   Resolution:  fixed
 Keywords:| Triage Stage:  Accepted
Has patch:  1 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+
Changes (by Mariusz Felisiak ):

 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"cab36618326524b336517c2c5fd62633916818e0" cab36618]:
 {{{
 #!CommitTicketReference repository=""
 revision="cab36618326524b336517c2c5fd62633916818e0"
 Fixed #31027 -- Replaced .getAttribute()/.setAttribute() usage with DOM
 properties.
 }}}

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.75c78bec9d4e8cbcd44cec2b34d1f40a%40djangoproject.com.


Re: [Django] #31027: Prefer DOM object properties over Element.getAttribute() and Element.setAttribute(). (was: Prefer DOM object properties over Element.getAttribute() and Element.setAttribute())

2019-11-25 Thread Django
#31027: Prefer DOM object properties over Element.getAttribute() and
Element.setAttribute().
--+
 Reporter:  Jon Dufresne  |Owner:  nobody
 Type:  Cleanup/optimization  |   Status:  new
Component:  contrib.admin |  Version:  master
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  1 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+
Changes (by felixxm):

 * stage:  Unreviewed => Accepted


Comment:

 I agree that we should prefer DOM properties but we need to be aware of
 differences and caveats (see [https://javascript.info/dom-attributes-and-
 properties comparison]). For example `href` is quite tricky because as a
 DOM property it's always a full URL, even if the attribute contains a
 relative URL or just a `#` and of course on IE it doesn't work that way.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.8da9f11065d83115b91458346e829670%40djangoproject.com.


Re: [Django] #31027: Prefer DOM object properties over Element.getAttribute() and Element.setAttribute()

2019-11-24 Thread Django
#31027: Prefer DOM object properties over Element.getAttribute() and
Element.setAttribute()
-+-
 Reporter:  Jon Dufresne |Owner:  nobody
 Type:   |   Status:  new
  Cleanup/optimization   |
Component:  contrib.admin|  Version:  master
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:
 |  Unreviewed
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Jon Dufresne):

 * has_patch:  0 => 1


Comment:

 https://github.com/django/django/pull/12138

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.82db5c563a156f8d4b800c4daa6a28a4%40djangoproject.com.


[Django] #31027: Prefer DOM object properties over Element.getAttribute() and Element.setAttribute()

2019-11-24 Thread Django
#31027: Prefer DOM object properties over Element.getAttribute() and
Element.setAttribute()
+
   Reporter:  Jon Dufresne  |  Owner:  nobody
   Type:  Cleanup/optimization  | Status:  new
  Component:  contrib.admin |Version:  master
   Severity:  Normal|   Keywords:
   Triage Stage:  Unreviewed|  Has patch:  0
Needs documentation:  0 |Needs tests:  0
Patch needs improvement:  0 |  Easy pickings:  0
  UI/UX:  0 |
+
 Some JavaScript code uses `Element.getAttribute()` or
 `Element.setAttribute()` to access data that is available through a DOM
 object property. In general, the properties should be preferred as they
 are always normalized values and typed. The
 `getAttribute()`/`setAttribute()` are an abstraction over the serialized
 text representation.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/052.85932744c295df401b61c34ba1272c7b%40djangoproject.com.