-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SVG2: Test foreignObject is a graphics element #8135
Conversation
<h:script><![CDATA[ | ||
test(function() { | ||
var target = document.getElementById('target'); | ||
assert_true(target instanceof SVGGraphicsElement); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
instanceof
is defined to walk the entire prototype chain; we should be able to assert something more specific as to where exactly it is in the prototype chain.
I think what we want is assert_equals(target.__proto__.__proto__, SVGGraphicsElement.prototype)
?
That said, this is essentially just testing interface SVGForeignObjectElement : SVGGraphicsElement
, i.e., what interface SVGForeignObjectElement
inherits from I believe? That, at least, will be tested by idlharness.js
in /svg/interfaces.html, specifically by the test it creates with the name of "SVGForeignObjectElement interface: existence and properties of interface object".
Build PASSEDStarted: 2017-11-09 22:48:45 View more information about this build on: |
cf2fa05
to
966b257
Compare
<svg xmlns="http://www.w3.org/2000/svg" | ||
xmlns:h="http://www.w3.org/1999/xhtml"> | ||
<metadata> | ||
<link xmlns="http://www.w3.org/1999/xhtml" rel="help" href="https://www.w3.org/TR/2013/WD-SVG2-20130618/extend.html#ForeignObjectElement"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we really want to link to such an old version of the spec? Aside from that LGTM. Fix if you want or I'll merge in a minute.
Tests change https://svgwg.org/svg2-draft/changes.html#extend "Made ‘foreignObject’ a graphics element."
966b257
to
770da9f
Compare
Tests change
https://svgwg.org/svg2-draft/changes.html#extend
"Made ‘foreignObject’ a graphics element."