From 9f61c05495de0b4ef98440c37a3037d3d8caff7d Mon Sep 17 00:00:00 2001 From: Gary Burgess Date: Sat, 23 Sep 2017 10:44:03 +0100 Subject: [PATCH] Update HTMLElement FFI code to match purs definitions Removes the duplicate `hidden` / `isHidden` and orders the defs in the FFI file the same as those in the purescript module. --- src/DOM/HTML/HTMLElement.js | 61 ++++++++++++------------------------- 1 file changed, 20 insertions(+), 41 deletions(-) diff --git a/src/DOM/HTML/HTMLElement.js b/src/DOM/HTML/HTMLElement.js index acc8919..b44370c 100644 --- a/src/DOM/HTML/HTMLElement.js +++ b/src/DOM/HTML/HTMLElement.js @@ -93,14 +93,6 @@ exports.setHidden = function (hidden) { // ---------------------------------------------------------------------------- -exports.click = function (elt) { - return function () { - return elt.click(); - }; -}; - -// ---------------------------------------------------------------------------- - exports.tabIndex = function (elt) { return function () { return elt.tabIndex; @@ -118,39 +110,6 @@ exports.setTabIndex = function (tabIndex) { // ---------------------------------------------------------------------------- -exports.hidden = function (elt) { - return function () { - return elt.hidden; - }; -}; - -exports.setHidden = function (hidden) { - return function (elt) { - return function () { - elt.hidden = hidden; - return {}; - }; - }; -}; - -// ---------------------------------------------------------------------------- - -exports.focus = function (elt) { - return function () { - return elt.focus(); - }; -}; - -// ---------------------------------------------------------------------------- - -exports.blur = function (elt) { - return function () { - return elt.blur(); - }; -}; - -// ---------------------------------------------------------------------------- - exports.draggable = function (elt) { return function () { return elt.draggable; @@ -206,6 +165,26 @@ exports.setSpellcheck = function (spellcheck) { }; }; +// ---------------------------------------------------------------------------- + +exports.click = function (elt) { + return function () { + return elt.click(); + }; +}; + +exports.focus = function (elt) { + return function () { + return elt.focus(); + }; +}; + +exports.blur = function (elt) { + return function () { + return elt.blur(); + }; +}; + // - CSSOM --------------------------------------------------------------------- exports.getBoundingClientRect = function (el) {