Created
May 29, 2013 00:04
-
-
Save JanMiksovsky/5667061 to your computer and use it in GitHub Desktop.
This test case for Polymer contrasts three similar situations in which a test element is used, but one of them is "upgraded" (converted from plain DOM to custom element instance) in an unexpected manner.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<script src="../polymer/polymer.js"></script> | |
<element name="test-element"> | |
<template> | |
BEGIN <content></content> END | |
</template> | |
<script> | |
Polymer.register( this ); | |
</script> | |
</element> | |
</head> | |
<body> | |
<!-- Three test cases with slightly different containers and contents. --> | |
<!-- Works as expected --> | |
<h3>Case #1</h3> | |
<test-element> | |
<div>top-level custom element with content in div</div> | |
</test-element> | |
<!-- Does NOT work as expected --> | |
<h3>Case #2</h3> | |
<p> | |
<test-element> | |
<div>p holding custom element with content in div</div> | |
</test-element> | |
</p> | |
<!-- Works as expected --> | |
<h3>Case #3</h3> | |
<p> | |
<test-element> | |
<span>p holding custom element with content in span</span> | |
</test-element> | |
</p> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment