diff options
| author | Lars Ingebrigtsen | 2020-04-30 06:05:17 +0200 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2020-04-30 06:05:26 +0200 |
| commit | 6c1b12e7d2ff38e313eae97bfd01746ecacdb02f (patch) | |
| tree | 9df52d6f67c91d5107b6d2af3af8df952264733b /test | |
| parent | 0a982c077e7393d865622ff780906a0cb252348d (diff) | |
| download | emacs-6c1b12e7d2ff38e313eae97bfd01746ecacdb02f.tar.gz emacs-6c1b12e7d2ff38e313eae97bfd01746ecacdb02f.zip | |
Add new function dom-remove-attribute
* doc/lispref/text.texi (Document Object Model): Document it.
* lisp/dom.el (dom-remove-attribute): Add new function.
Diffstat (limited to 'test')
| -rw-r--r-- | test/lisp/dom-tests.el | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/lisp/dom-tests.el b/test/lisp/dom-tests.el index d44851eb13b..eb15500d84c 100644 --- a/test/lisp/dom-tests.el +++ b/test/lisp/dom-tests.el | |||
| @@ -84,6 +84,13 @@ | |||
| 84 | (dom-set-attribute dom attr value) | 84 | (dom-set-attribute dom attr value) |
| 85 | (should (equal (dom-attr dom attr) value)))) | 85 | (should (equal (dom-attr dom attr) value)))) |
| 86 | 86 | ||
| 87 | (ert-deftest dom-tests-remove-attribute () | ||
| 88 | (let ((dom `(body ((foo . "bar") (zot . "foobar"))))) | ||
| 89 | (should (equal (dom-attr dom 'foo) "bar")) | ||
| 90 | (dom-remove-attribute dom 'foo) | ||
| 91 | (should (equal (dom-attr dom 'foo) nil)) | ||
| 92 | (should (equal dom '(body ((zot . "foobar"))))))) | ||
| 93 | |||
| 87 | (ert-deftest dom-tests-attr () | 94 | (ert-deftest dom-tests-attr () |
| 88 | (let ((dom (dom-tests--tree))) | 95 | (let ((dom (dom-tests--tree))) |
| 89 | (should-not (dom-attr dom 'id)) | 96 | (should-not (dom-attr dom 'id)) |