Warning: Use of Mutation Events (DOMAttrModified) is deprecated. Use MutationObserver instead.
Categories
(Calendar :: Calendar Frontend, defect)
Tracking
(Not tracked)
People
(Reporter: Fallen, Assigned: darktrojan)
References
(Blocks 1 open bug)
Details
Attachments
(1 file, 2 obsolete files)
29.20 KB,
patch
|
pmorris
:
review+
|
Details | Diff | Splinter Review |
Comment 1•13 years ago
|
||
Reporter | ||
Comment 2•13 years ago
|
||
Comment 3•13 years ago
|
||
Updated•13 years ago
|
Comment 5•12 years ago
|
||
Reporter | ||
Comment 6•12 years ago
|
||
Reporter | ||
Comment 7•12 years ago
|
||
Comment 8•12 years ago
|
||
Updated•11 years ago
|
Updated•10 years ago
|
Updated•10 years ago
|
Updated•8 years ago
|
Comment 10•7 years ago
|
||
Comment 11•7 years ago
|
||
Updated•7 years ago
|
Updated•7 years ago
|
Comment 12•7 years ago
|
||
Comment 13•7 years ago
|
||
Reporter | ||
Comment 14•7 years ago
|
||
Comment 15•7 years ago
|
||
Comment 16•7 years ago
|
||
Comment 17•7 years ago
|
||
Comment 18•7 years ago
|
||
Comment 19•7 years ago
|
||
Comment 20•7 years ago
|
||
Comment 21•7 years ago
|
||
Comment 22•7 years ago
|
||
Updated•7 years ago
|
Comment 23•7 years ago
|
||
Updated•6 years ago
|
Comment 25•6 years ago
|
||
With all de-xbl work and new custom elements the last patch no longer applies. Custom elements also have an "attributeChangedCallback()" (together with "static get observedAttributes()") which might be better than the MutationObserver for some cases.
Comment 26•5 years ago
|
||
Mochitest is here to stay since December 2019.
During local mochitest run with FULL DEBUG version of TB, I noticed a few warnings related to the issue in this bugzilla.
Here is a summary printed by local shell script to summarize the errors/warnings in the log.
I inserted the bugzilla number so that I will check this bugzilla until these warnings are sorted out.
========================================
Deprecated: (checked since Apri 23, 2015)
modulo process id and timestamp
https://bugzilla.mozilla.org/show_bug.cgi?id=758493
Bug 758493 Warning: Use of Mutation Events (DOMAttrModified) is deprecated. Use MutationObserver instead.
========================================
10 14:15.26 INFO Console message: [JavaScript Warning: "Use of Mutation Events is deprecated. Use MutationObserver instead." {file: "chrome://calendar/content/calendar-daypicker.js" line: 27}]
5 3:15.60 INFO Console message: [JavaScript Warning: "Use of Mutation Events is deprecated. Use MutationObserver instead." {file: "chrome://calendar/content/calendar-event-dialog-attendees.js" line: 44}]
There are now only two places where these are (dynamically ?) executed.: Not sure if the warning is printed at the time of parsing or execution.
https://searchfox.org/comm-central/source/calendar/base/content/calendar-daypicker.js#27
this.setAttribute("disable-on-occurrence", "true");
this.addEventListener("DOMAttrModified", this.onModified); <==== This
}
onModified(aEvent) {
if (aEvent.attrName == "checked") {
let event = document.createEvent("Events");
event.initEvent("select", true, true);
this.calendar.dispatchEvent(event);
}
}
}
// first of all, attach all event handlers
window.addEventListener("resize", onResize, true);
window.addEventListener("rowchange", onRowChange, true);
window.addEventListener("DOMAttrModified", onAttrModified, true); <===
window.addEventListener("timebar", onTimebar, true);
window.addEventListener("timechange", onTimeChange, true
onAttrModified seems to be the one defined at
https://searchfox.org/comm-central/source/calendar/base/content/dialogs/calendar-event-dialog-attendees.js#847
I don't have to file a separate bugzilla for these warnings from mochitest, correct?
Assignee | ||
Comment 27•5 years ago
|
||
There's only two left and I'm about to kill one in bug 1639763. I'll do the other here.
Assignee | ||
Comment 28•5 years ago
|
||
We don't even need this event listener, it works just as well without – the command event bubbles further up the DOM tree and is caught by another listener.
Without the listener all this particular binding does is add some attributes to itself, so let's just do that in the .xhtml file and get rid of the binding. Also some more-modern CSS to get rid of some unnecessary attributes while we're here.
Comment 29•5 years ago
|
||
Assignee | ||
Updated•5 years ago
|
Comment 30•5 years ago
|
||
Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/b5646e5ec9f3
Remove calendar-daypicker binding and last use of DOMAttrModified in calendar. r=pmorris a=me
Assignee | ||
Updated•5 years ago
|
Description
•