Skip to content

Commit

Permalink
Merge interactive.js with dom.js
Browse files Browse the repository at this point in the history
  • Loading branch information
lauriro committed Jan 13, 2025
1 parent f9c2642 commit 554d054
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 26 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
LiteJS DOM – [![Coverage][1]][2] [![Size][3]][4] [![Buy Me A Tea][5]][6]
==========

Dependency-free DOM library for handling HTML and CSS files on server-side.
Dependency-free DOM library for handling HTML, XML and CSS files on server-side.


```javascript
Expand Down
16 changes: 11 additions & 5 deletions dom.js
Original file line number Diff line number Diff line change
Expand Up @@ -340,16 +340,22 @@ function HTMLElement(tag) {
}

extendNode(HTMLElement, Element, {
localName: null,
namespaceURI: "http://www.w3.org/1999/xhtml",
nodeType: 1,
matches(sel) {
return selector.matches(this, sel)
tagName: null,
blur() {
this.ownerDocument.activeElement = null
},
closest(sel) {
return selector.closest(this, sel)
},
namespaceURI: "http://www.w3.org/1999/xhtml",
localName: null,
tagName: null,
focus() {
this.ownerDocument.activeElement = this
},
matches(sel) {
return selector.matches(this, sel)
},
toString(minify) {
var attrs = this.attributes.toString(minify)
, isXml = this.ownerDocument.contentType === "application/xml"
Expand Down
18 changes: 0 additions & 18 deletions interactive.js

This file was deleted.

3 changes: 1 addition & 2 deletions test/interactive.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

describe("Interactive DOM", () => {
var undef
, { document } = require("../interactive")
, it = describe.it
, { document } = require("..")

it("have focus and blur", assert => {
var el = document.createElement("h1")
Expand Down

0 comments on commit 554d054

Please sign in to comment.