Skip to content

Commit

Permalink
Console testing
Browse files Browse the repository at this point in the history
  • Loading branch information
colinrotherham committed Dec 23, 2022
1 parent 7a04f3f commit fa7ff88
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/govuk/components/accordion/accordion.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,12 @@ Accordion.prototype.initControls = function () {

// Create control wrapper and add controls to it
var $accordionControls = document.createElement('div')

console.log('$accordionControls (Accordion.prototype.initControls)')
console.log($accordionControls)
console.log($accordionControls.setAttribute)
console.log($accordionControls.appendChild)

$accordionControls.setAttribute('class', this.controlsClass)
$accordionControls.appendChild(this.$showAllButton)
this.$module.insertBefore($accordionControls, this.$module.firstChild)
Expand Down
5 changes: 5 additions & 0 deletions src/govuk/components/details/details.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,11 @@ Details.prototype.polyfillSetAttributes = function () {
* @param {polyfillHandleInputsCallback} callback - function
*/
Details.prototype.polyfillHandleInputs = function (callback) {
console.log('this (Details.prototype.polyfillHandleInputs)')
console.log(this)
console.log(this.$summary)
console.log(this.$summary.addEventListener)

this.$summary.addEventListener('keypress', function (event) {
var $target = event.target
// When the key gets pressed - check if it is enter or space
Expand Down

0 comments on commit fa7ff88

Please sign in to comment.