From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out.smtp-auth.no-ip.com (smtp-auth.no-ip.com [8.23.224.60]) by hurricane.the-brannons.com (Postfix) with ESMTPS id 396E977BBB for ; Sun, 16 Jun 2019 21:10:47 -0700 (PDT) X-No-IP: carhart.net@noip-smtp X-Report-Spam-To: abuse@no-ip.com Received: from carhart.net (unknown [99.57.137.251]) (Authenticated sender: carhart.net@noip-smtp) by smtp-auth.no-ip.com (Postfix) with ESMTPA id BA39337FB2F for ; Sun, 16 Jun 2019 21:10:46 -0700 (PDT) Received: from localhost (kevin@localhost) by carhart.net (8.15.2/8.15.2) with ESMTP id x5H4Ai7O045253 for ; Sun, 16 Jun 2019 21:10:44 -0700 Date: Sun, 16 Jun 2019 21:10:44 -0700 (PDT) From: Kevin Carhart To: edbrowse-dev@lists.the-brannons.com Subject: [edbrowse-dev] [PATCH] element.dataset and h/w dimension properties added to element prototype Message-ID: User-Agent: Alpine 2.21 (DEB 202 2017-01-01) X-BeenThere: edbrowse-dev@edbrowse.org List-Id: Edbrowse Development List MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="-1463766271-1139975899-1560744644=:43864" This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. ---1463766271-1139975899-1560744644=:43864 Content-Type: text/plain; format=flowed; charset=US-ASCII I can't use edbrowse sm at the moment so in case alpine adds bad linefeeds, please refer to the attached >From c5653a8493bf6bf898355431b6fbc1ebcc09e566 Mon Sep 17 00:00:00 2001 From: Kevin Carhart Date: Sun, 16 Jun 2019 19:55:10 -0700 Subject: [PATCH] Makes html data-* attributes available in element.dataset object. Also adds screen dimension properties to element.prototype. --- src/decorate.c | 12 ++++++++++++ src/jsrt | 4 +++- src/startwindow.js | 8 ++++++++ 3 files changed, 23 insertions(+), 1 deletion(-) diff --git a/src/decorate.c b/src/decorate.c index 52e2459..c9ad47a 100644 --- a/src/decorate.c +++ b/src/decorate.c @@ -937,6 +937,7 @@ static void domLink(struct htmlTag *t, const char *classname, /* instantiate thi const char *stylestring = attribVal(t, "style"); jsobjtype so = 0; /* obj.style */ jsobjtype ato = 0; /* obj.attributes */ + jsobjtype dso = 0; /* obj.dataset */ char upname[MAXTAGNAME]; debugPrint(5, "domLink %s.%d name %s", @@ -1043,6 +1044,8 @@ Don't do any of this if the tag is itself