Closed
Bug 1818245
Opened 2 years ago
Closed 2 years ago
Consolidate dynamic attribute setting code in UrlbarView
Categories
(Firefox :: Address Bar, task)
Firefox
Address Bar
Tracking
()
RESOLVED
FIXED
112 Branch
Tracking | Status | |
---|---|---|
firefox112 | --- | fixed |
People
(Reporter: dao, Assigned: dao)
References
(Blocks 1 open bug)
Details
(Whiteboard: [snt-urlbar-result-menu])
Attachments
(1 file)
(deleted),
text/x-phabricator-request
|
Details |
In bug 1813517 I added another case where we take an attributes
property to set arbitrary attributes on an element. We should consolidate and share this code with other places doing the same thing, thereby fixing a few shortcomings:
- properly set boolean attributes as
foo=""
/[attribute absent] instead offoo="true"
/foo="false"
- avoid creating and iterating over a dummy object in case the
attribute
property isn't set - don't override previously set-via-
classList
classes when setting theclass
attribute - remove the attribute when the value is
undefined
(current=== null
check is too strict)
Updated•2 years ago
|
See Also: → https://mozilla-hub.atlassian.net/browse/SNT-529
Assignee | ||
Comment 1•2 years ago
|
||
In bug 1813517 I added another case where we take an attributes
property to set arbitrary attributes on an element. We should consolidate and share this code with other places doing the same thing, thereby fixing a few shortcomings:
- properly set boolean attributes as
foo=""
/[attribute absent] instead offoo="true"
/foo="false"
- avoid creating and iterating over a dummy object in case the
attribute
property isn't set - don't override previously set-via-
classList
classes when setting theclass
attribute - remove the attribute when the value is
undefined
(current=== null
check is too strict)
Pushed by dgottwald@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/e37f5cc3f9e9
Consolidate dynamic attribute setting code in UrlbarView. r=adw
Comment 3•2 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 112 Branch
You need to log in
before you can comment on or make changes to this bug.
Description
•