Skip to content

Commit

Permalink
removed droppable attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
andolf committed Feb 14, 2023
1 parent 79746df commit d83f0a9
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 @@ -38,13 +38,4 @@ export default 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 @@ -21,20 +21,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 d83f0a9

Please sign in to comment.