JSFiddle - React, Tailwind, and code Playground
by b_g_v
HTML
<input id="BB">
<div id="AA">
Pepper (Inspector of Taxes) v Hart [1992] UKHL 3, is a landmark decision of the House of Lords on the use of legislative history in statutory interpretation. The court established the principle that when primary legislation is ambiguous then, under certain circumstances, the court may refer to statements made in the House of Commons or House of Lords in an attempt to interpret the meaning of the legislation. Before this ruling, such an action would have been seen as a breach of parliamentary privilege.[1]
Hart and nine others were teachers at Malvern College who benefited from a "concessionary fee" scheme that allowed their children to be educated at the college for one fifth of the normal fees of a pupil. The Inland Revenue attempted to tax this benefit based on the Finance Act 1976. There was a dispute over exactly what the Act meant, which could be resolved with the use of Hansard, something not allowed at the time. The Special Commissioners charged with assessing the tax found in favour of Hart, however both the High Court of Justice and Court of Appeal of England and Wales found in favour of the Inland Revenue. The case then went to the House of Lords, which found in favour of Hart and allowed the use of Hansard. Lord Mackay, dissenting, argued that Hansard should not be considered admissible evidence because of the time and expense involved in a lawyer having to look up every debate and discussion on a particular statute when giving legal advice or preparing a case.
The decision met a mixed reception. While the judiciary were cautiously accepting, legal academics argued that it violated rules of evidence, damaged the separation of powers between the executive and Parliament and caused additional expense in cases. The decision was subjected to an assault by Lord Steyn in his Hart Lecture, delivered on 16 May 2000 and titled "Pepper v Hart: A Re-examination", in which he disputed exactly what the House of Lords had meant by their...
JavaScript
/*
document.getElementById('AA').focus();
console.log(document.getElementById('AA'));
input = document.getElementById('BB').focus();
console.log(document.getElementById('BB'));
*/
//var evt = new KeyboardEvent('keydown', {'keyCode':34, 'which':34});
//document.dispatchEvent (evt);
/*
var el1 = document.getElementById('AA');
var el2 = document.getElementById('BB');
el1.focus();
var e = jQuery.Event("keypress");
e.which = 34;
//e.altKey = true;
$("#AA").trigger(e);
var e1 = new KeyboardEvent('keypress',{'key':'End'});
el1.dispatchEvent(e1);
document.body.dispatchEvent(e1);
var e3 = document.createEvent("KeyboardEvent");
e3.initKeyboardEvent("keydown", true, true, document.defaultView, "End", 0, "", false, "");
el1.dispatchEvent(e3);
e3.initKeyboardEvent("keyup", true, true, document.defaultView, "End", 0, "", false, "");
el1.dispatchEvent(e3);
console.log(el1);
console.log('--------------');
*/
setTimeout(function() {
$("AA").focus();
//$("BB").focus();
//alert('focus()');
}, 2000);
setTimeout(function() {
var event = jQuery.Event('keypress');
event.which = 13;
event.keyCode = 35;
jQuery("AA").trigger(event);
var press = jQuery.Event("keypress");
press.ctrlKey = false;
press.which = 35;
$("AA").trigger(press);
//alert('trigger()');
}, 3000);
//console.log('--------------');