emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] trunk r115331: Treat HTML5 input types as text


From: Lars Ingebrigtsen
Subject: [Emacs-diffs] trunk r115331: Treat HTML5 input types as text
Date: Sun, 01 Dec 2013 15:38:48 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 115331
revision-id: address@hidden
parent: address@hidden
author: RĂ¼diger Sonderfeld <address@hidden>
committer: Lars Magne Ingebrigtsen <address@hidden>
branch nick: trunk
timestamp: Sun 2013-12-01 16:38:43 +0100
message:
  Treat HTML5 input types as text
  * net/eww.el (eww-text-input-types): : New const.
  (eww-process-text-input): Treat input types in
  `eww-text-input-types' as text.
modified:
  lisp/net/eww.el                eww.el-20130610114603-80ap3gwnw4x4m5ix-1
=== modified file 'lisp/net/eww.el'
--- a/lisp/net/eww.el   2013-12-01 14:45:02 +0000
+++ b/lisp/net/eww.el   2013-12-01 15:38:43 +0000
@@ -634,12 +634,19 @@
                             :name (cdr (assq :name cont))))
     (insert " ")))
 
+(defconst eww-text-input-types '("text" "password" "textarea"
+                                 "color" "date" "datetime" "datetime-local"
+                                 "email" "month" "number" "search" "tel"
+                                 "time" "url" "week")
+  "List of input types which represent a text input.
+See URL `https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Input'.")
+
 (defun eww-process-text-input (beg end length)
   (let* ((form (get-text-property (min (1+ end) (point-max)) 'eww-form))
         (properties (text-properties-at end))
         (type (plist-get form :type)))
     (when (and form
-              (member type '("text" "password" "textarea")))
+              (member type eww-text-input-types))
       (cond
        ((zerop length)
        ;; Delete some space at the end.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]