Skip to content

Commit

Permalink
removed droppable attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
andolf committed Jan 30, 2023
1 parent 91967bb commit dfd1a15
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 24 deletions.
2 changes: 1 addition & 1 deletion app/assets/public/dnd.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</head>
<body>
<div draggable="true">draggable</div>
<div droppable="false">droppable</div>
<div>droppable</div>
<script>
(function IIFE() {
window.scriptsAreExecutedInBody = true;
Expand Down
9 changes: 0 additions & 9 deletions lib/HTMLElement.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,4 @@ module.exports = class HTMLElement extends Element {
this.getAttribute("draggable", !!value);
return value;
}

get droppable() {
return !!this.getAttribute("droppable");
}

set droppable(value) {
this.getAttribute("droppable", !!value);
return value;
}
};
14 changes: 0 additions & 14 deletions test/drag-and-drop-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,6 @@ describe("drag and drop", () => {
expect(divs[1].draggable = true).to.equal(true);
});

it("can read droppable property", () => {
const divs = browser.document.getElementsByTagName("div");

expect(divs[0].droppable).to.equal(false);
expect(divs[1].droppable).to.equal(true);
});

it("can set droppable property", () => {
const divs = browser.document.getElementsByTagName("div");

expect(divs[0].droppable = true).to.equal(true);
expect(divs[1].droppable = false).to.equal(false);
});

describe("events", () => {
it("dispatches start event when dragging", (done) => {
const [draggable] = browser.document.getElementsByTagName("div");
Expand Down

0 comments on commit dfd1a15

Please sign in to comment.