-
Notifications
You must be signed in to change notification settings - Fork 5
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
Add HTMLButtonElement interface to custom element test #83
base: gh-pages
Are you sure you want to change the base?
Conversation
cea39f6
to
cef1df4
Compare
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>Custom Elements: CEReactions on Element interface</title> |
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.
s/Element/HTMLButtonElement/g
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.
Element has been replaced.
@@ -0,0 +1,114 @@ | |||
<!DOCTYPE html> | |||
<html> | |||
<head> |
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.
head, html, body labels are unnecessary.
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.
Labels head and html have been omitted.
<body> | ||
<script> | ||
|
||
//IDL attribute reflects the content attribute of the same name inside the parent Node |
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.
Actually I can't understand the comments.
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.
Notes are updated.
} | ||
|
||
//IDL attribute reflects the content attribute of the same name which depends another attribute inside the parent Node | ||
function testReflectAttributeWithDepAttributeWithContentValues(subJsAttrName, subConAttrName, depAttrName, subJsAttrValue1, subConAttrValue1, subJsAttrValue2, subConAttrValue2, depAttrValue, name, subElementName, pareElementName, interfaceName) { |
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.
function name is tooooo long.
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.
The name is cutted
cef1df4
to
58fba0d
Compare
<script src="/tests/custom-elements/resources/testharness.js"></script> | ||
<script src="/tests/custom-elements/resources/testharnessreport.js"></script> | ||
<script src="./custom-elements-helpers.js"></script> | ||
<script src="./reactions.js"></script> |
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.
remove './'
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.
'./' has been removed.
|
||
//In parent node, sub node's observeAttribute can enqueue by changing attribute value | ||
//Re->reflect, At->attribute, P->parent, Co->content | ||
function testReAtWithPNodeWithCoValues(jsAtName, coAtName, jsAtValue1, coAtValue1, jsAtValue2, coAtValue2, name, elementName, pElementName, interfaceName) { |
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.
How about testReflectAttrWithContentValuesAndPNode
? And replace the second line of comment with "Test reflect attribute with content values and parent node", not sure if I am right.
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.
Your suggestion is good, I has updated.
parentElement.parentNode.removeChild(parentElement); | ||
} | ||
|
||
//Package JS attribute with parent Node to test |
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.
ditto
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.
Has updated.
} | ||
|
||
//In parent node, sub node's observeAttribute which depends another attribute can enqueue by changing attribute value | ||
//Re->reflect, At->attribute, De->depdent, Co->content |
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.
ditto
parentElement.parentNode.removeChild(parentElement); | ||
} | ||
|
||
//Package JS attribute depends another atrribute |
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.
ditto
testReAtWithDeAtWithCoValues(jsAtName, coAtName, deAtName, jsAtValue1, jsAtValue1, jsAtValue2, jsAtValue2, deAtValue, name, elementName, pElementName, interfaceName); | ||
} | ||
|
||
testReflectAttributeWithContentValues('autofocus', 'autofocus', true, 'true', false, 'false', 'autofocus on HTMLButtonElement', 'button', HTMLButtonElement); |
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.
move following test function calls to the beginning of <script>
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.
Move function calls to the beginning of <script>
58fba0d
to
56efcb3
Compare
@@ -0,0 +1,112 @@ | |||
<!DOCTYPE html> | |||
<title>Custom Elements: CEReactions on HTMLButtonElement interface</title> | |||
<meta name="author" title="Zhang xiaoyu" href="[email protected]"> |
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.
s/xiaoyu/Xiaoyu
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.
Has updated
|
||
//In parent node, sub node's observeAttribute can enqueue by changing attribute value | ||
//Test reflect attribute with content values and parent node | ||
function testReAtWithPNodeWithCoValues(jsAtName, coAtName, jsAtValue1, coAtValue1, jsAtValue2, coAtValue2, name, elementName, pElementName, interfaceName) { |
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.
You didn't update the function name.
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.
The function name has been updated
} | ||
|
||
//Package refect attribute with parent Node | ||
function testReAtWithPNode(jsAtName, coAtName, jsAtValue1, jsAtValue2, name, elementName, pElementName, interfaceName) { |
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.
Ditto
|
||
//In parent node, sub node's observeAttribute which depends another attribute can enqueue by changing attribute value | ||
//Test reflect attribute with content values and dependent attribute | ||
function testReAtWithDeAtWithCoValues(jsAtName, coAtName, deAtName, jsAtValue1, coAtValue1, jsAtValue2, coAtValue2, deAtValue, name, elementName, pElementName, interfaceName) { |
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.
Ditto
|
||
test(() => { | ||
var element = define_build_in_custom_element([coAtName], interfaceName, elementName); | ||
var instance = document.createElement(elementName, { is: element.name}); |
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.
need whitespace after element.name
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.
Please check other {}
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.
Whitespace has updated
} | ||
|
||
//Package reflect attribute with dependent attribute | ||
function testReAtWithDeAt(jsAtName, coAtName, deAtName, jsAtValue1, jsAtValue2, deAtValue, name, elementName, pElementName, interfaceName) { |
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.
Ditto
56efcb3
to
a6176f6
Compare
All attributes use built-in way