1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta http-equiv="content-type" content="text/html; charset=UTF-8">
- <title>Test 035</title>
- <script>
- var Hyphenopoly = {
- require: {
- "hu": "FORCEHYPHENOPOLY"
- },
- setup: {
- selectors: {
- ".hyphenate": {
- hyphen: "•"
- }
- }
- },
- handleEvent: {
- hyphenopolyEnd: function (e) {
- window.Hyphenopoly = null;
- assert();
- }
- }
- };
- function assert() {
- var test = document.getElementById("test1").innerHTML;;
- var ref = document.getElementById("ref1").innerHTML;;
- var result = false;
- if (test === ref) {
- result = result || true;
- } else {
- result = result || false;
- }
- result = result && !window.Hyphenopoly;
- if (result) {
- document.getElementById("result").innerHTML += "<p style=\"background-color: #d6ffd6\">passed</p>";
- } else {
- document.getElementById("result").innerHTML += "<p style=\"background-color: #ffd6d6\">failed</p>";
- }
- if (parent != window) {
- parent.postMessage(JSON.stringify({
- desc: document.getElementById("desc").innerHTML,
- index: 35,
- result: (result ? "passed" : "failed")
- }), window.location.href);
- }
- }
- </script>
- <script src="../Hyphenopoly_Loader.js"></script>
- <style type="text/css">
- body {
- width:50%;
- margin-left:25%;
- margin-right:25%;
- }
- .test {
- background-color: #D8E2F9;
- }
- .ref {
- background-color: #FEEFC0;
- }
- .hyphenate {
- hyphens: auto;
- -ms-hyphens: auto;
- -moz-hyphens: auto;
- -webkit-hyphens: auto;
- }
- </style>
- </head>
- <body>
- <div id="navigate"><a href="index.html">↞ Index</a> | <a href="test34.html">← Prev</a> | <a href="test36.html">Next →</a></div>
- <h1>Test 035</h1>
- <p id="desc">Remove Hyphenopoly when finished.</p>
- <div id="result"></div>
- <hr>
- <p id="test1" class="test hyphenate" lang="hu">automatikusan</p>
- <p id="ref1" class="ref" lang="hu">au•to•ma•ti•ku•san</p>
- <hr>
- <div><span class="test">Test</span> <span class="ref">Ref</span></div>
- </body>
- </html>
|