Bug 796869 - [contacts] Get ready for CSP #5637
Conversation
/botio lint |
From: Bot.io (Main)ReceivedCommand cmd_lint from @albertopq received. Current queue size: 0 Live output at: http://50.116.11.35:8000/51470d7e681f801/output.txt |
From: Bot.io (Main)FailedFull output at http://50.116.11.35:8000/51470d7e681f801/output.txt Total script time: 1.86 mins Lint: FAILED |
r+ from my side. I've been trying it in the otoro and I can't see any problem. |
@@ -567,10 +568,86 @@ var Contacts = (function() { | |||
loading.classList.remove('show-overlay'); | |||
}; | |||
|
|||
var initEventListeners = function initEventListener() { | |||
// Activity (any) cancellation | |||
document.getElementById('cancel_activty').addEventListener('click', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we have something more generic and easy to be read like
var listeners = [
{
selector: 'mySelector',
handler: myFunction
}
]
@jmcanterafonseca @albertopq updated, r? |
} | ||
|
||
// Add extra fields to edit mode | ||
var addElementButtons = document.querySelectorAll('#contact-form > button'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if the array above declares selectors i.e. '#xx'' instead of ids, we could remove this code and use the same mechanism as above, right? of course we would need to change also getElementById by querySelectorAll but that approach will save us from some lines of code
@jmcanterafonseca r? (patch v3 sent to bugzilla) |
@jmcanterafonseca last r? (fingers crossed is the last one), sorry for the many updates! |
Got the r+ from @jmcanterafonseca in bugzilla, merging |
Bug 796869 - [contacts] Get ready for CSP
Removing inline javascript from contacts app.
Still pending the fb part, to be done in a follow up
/cc @albertopq to r? in bugzilla: https://bugzilla.mozilla.org/show_bug.cgi?id=796869