Skip to content

Commit

Permalink
Update dev dependencies
Browse files Browse the repository at this point in the history
This notably includes webidl2js's new major release which fixes #2158. A test is included. It also requires fixing our one old-style mixin.
  • Loading branch information
domenic committed Oct 14, 2019
1 parent a4bcb12 commit 0b7dba8
Show file tree
Hide file tree
Showing 6 changed files with 98 additions and 173 deletions.
8 changes: 7 additions & 1 deletion .eslintrc.json
Expand Up @@ -28,7 +28,13 @@
"no-empty-character-class": "error",
"no-ex-assign": "error",
"no-extra-boolean-cast": "error",
"no-extra-parens": ["error", "all", { "conditionalAssign": false, "nestedBinaryExpressions": false, "returnAssign": false }],
"no-extra-parens": [
"error",
"functions" // Should be "all", but https://github.com/eslint/eslint/issues/12428.
// TODO: update this when that gets settled. (If they reject the feature request then
// we'll just update our code, I guess.)
// { "conditionalAssign": false, "nestedBinaryExpressions": false, "returnAssign": false }
],
"no-extra-semi": "error",
"no-func-assign": "error",
"no-inner-declarations": "off",
Expand Down
2 changes: 1 addition & 1 deletion lib/jsdom/living/nodes/SVGGraphicsElement.webidl
Expand Up @@ -14,4 +14,4 @@ interface SVGGraphicsElement : SVGElement {
// DOMMatrix? getScreenCTM();
};

SVGGraphicsElement implements SVGTests;
SVGGraphicsElement includes SVGTests;
3 changes: 1 addition & 2 deletions lib/jsdom/living/nodes/SVGTests.webidl
@@ -1,6 +1,5 @@
// https://svgwg.org/svg2-draft/types.html#InterfaceSVGTests
[NoInterfaceObject]
interface SVGTests {
interface mixin SVGTests {
[SameObject] readonly attribute SVGStringList requiredExtensions;
[SameObject] readonly attribute SVGStringList systemLanguage;
};
6 changes: 3 additions & 3 deletions package.json
Expand Up @@ -61,7 +61,7 @@
"benchmark": "^2.1.4",
"browserify": "^16.2.3",
"chai": "^4.2.0",
"eslint": "^6.1.0",
"eslint": "^6.5.1",
"eslint-find-rules": "^3.3.1",
"eslint-plugin-html": "^6.0.0",
"eslint-plugin-jsdom-internal": "link:./scripts/eslint-plugin",
Expand All @@ -72,7 +72,7 @@
"karma-mocha": "^1.3.0",
"karma-mocha-webworker": "^1.3.0",
"minimatch": "^3.0.4",
"mocha": "^6.2.0",
"mocha": "^6.2.1",
"mocha-sugar-free": "^1.4.0",
"optimist": "0.6.1",
"portfinder": "^1.0.20",
Expand All @@ -82,7 +82,7 @@
"st": "^1.2.2",
"watchify": "^3.11.1",
"wd": "^1.11.2",
"webidl2js": "^9.2.2"
"webidl2js": "^10.0.0"
},
"browser": {
"canvas": false,
Expand Down
@@ -0,0 +1,32 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>Reflection isn't impacted by overridden (get|set)Attribute(NS) methods</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>

<script>
"use strict";
test(() => {
const div = document.createElement("div");
const calls = [];

div.getAttribute = () => {
calls.push("getAttribute");
};
div.getAttributeNS = () => {
calls.push("getAttributeNS");
};
div.setAttribute = () => {
calls.push("setAttribute");
};
div.setAttributeNS = () => {
calls.push("setAttributeNS");
};

// eslint-disable-next-line no-unused-expressions
div.title;
div.title = "foo";

assert_array_equals(calls, []);
});
</script>

0 comments on commit 0b7dba8

Please sign in to comment.