Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/testing/web-platform/tests/editing/data/   (Firefox Browser Version 153.0.1©)  Datei vom 27.6.2026 mit Größe 30 kB image not shown  

Quelle  inserthtml.js

  Sprache: JAVA
 

// For documentation of the format, see README in this directory.
var browserTests = [
["foo[]bar",
    [["stylewithcss","true"],["inserthtml","ab<b>c</b>d"]],
    "fooab<b>c</b>d{}bar",
    [true,true],
    {"stylewithcss":[false,false,"",false,true,""],"inserthtml":[false,false,"",false,false,""]}],
["foo[]bar",
    [["stylewithcss","false"],["inserthtml","ab<b>c</b>d"]],
    "fooab<b>c</b>d{}bar",
    [true,true],
    {"stylewithcss":[false,true,"",false,false,""],"inserthtml":[false,false,"",false,false,""]}],
["foo[bar]baz",
    [["stylewithcss","true"],["inserthtml","ab<b>c</b>d"]],
    "fooab<b>c</b>d{}baz",
    [true,true],
    {"stylewithcss":[false,false,"",false,true,""],"inserthtml":[false,false,"",false,false,""]}],
["foo[bar]baz",
    [["stylewithcss","false"],["inserthtml","ab<b>c</b>d"]],
    "fooab<b>c</b>d{}baz",
    [true,true],
    {"stylewithcss":[false,true,"",false,false,""],"inserthtml":[false,false,"",false,false,""]}],
["foo<span style=color:#aBcDeF>[bar]</span>baz",
    [["stylewithcss","true"],["inserthtml","ab<b>c</b>d"]],
    "fooab<b>c</b>d{}baz",
    [true,true],
    {"stylewithcss":[false,false,"",false,true,""],"inserthtml":[false,false,"",false,false,""]}],
["foo<span style=color:#aBcDeF>[bar]</span>baz",
    [["stylewithcss","false"],["inserthtml","ab<b>c</b>d"]],
    "fooab<b>c</b>d{}baz",
    [true,true],
    {"stylewithcss":[false,true,"",false,false,""],"inserthtml":[false,false,"",false,false,""]}],
["foo<span style=color:#aBcDeF>{bar}</span>baz",
    [["stylewithcss","true"],["inserthtml","ab<b>c</b>d"]],
    "fooab<b>c</b>d{}baz",
    [true,true],
    {"stylewithcss":[false,false,"",false,true,""],"inserthtml":[false,false,"",false,false,""]}],
["foo<span style=color:#aBcDeF>{bar}</span>baz",
    [["stylewithcss","false"],["inserthtml","ab<b>c</b>d"]],
    "fooab<b>c</b>d{}baz",
    [true,true],
    {"stylewithcss":[false,true,"",false,false,""],"inserthtml":[false,false,"",false,false,""]}],
["foo{<span style=color:#aBcDeF>bar</span>}baz",
    [["stylewithcss","true"],["inserthtml","ab<b>c</b>d"]],
    "fooab<b>c</b>d{}baz",
    [true,true],
    {"stylewithcss":[false,false,"",false,true,""],"inserthtml":[false,false,"",false,false,""]}],
["foo{<span style=color:#aBcDeF>bar</span>}baz",
    [["stylewithcss","false"],["inserthtml","ab<b>c</b>d"]],
    "fooab<b>c</b>d{}baz",
    [true,true],
    {"stylewithcss":[false,true,"",false,false,""],"inserthtml":[false,false,"",false,false,""]}],
["[foo<span style=color:#aBcDeF>bar]</span>baz",
    [["stylewithcss","true"],["inserthtml","ab<b>c</b>d"]],
    "ab<b>c</b>d{}baz",
    [true,true],
    {"stylewithcss":[false,false,"",false,true,""],"inserthtml":[false,false,"",false,false,""]}],
["[foo<span style=color:#aBcDeF>bar]</span>baz",
    [["stylewithcss","false"],["inserthtml","ab<b>c</b>d"]],
    "ab<b>c</b>d{}baz",
    [true,true],
    {"stylewithcss":[false,true,"",false,false,""],"inserthtml":[false,false,"",false,false,""]}],
["{foo<span style=color:#aBcDeF>bar}</span>baz",
    [["stylewithcss","true"],["inserthtml","ab<b>c</b>d"]],
    "ab<b>c</b>d{}baz",
    [true,true],
    {"stylewithcss":[false,false,"",false,true,""],"inserthtml":[false,false,"",false,false,""]}],
["{foo<span style=color:#aBcDeF>bar}</span>baz",
    [["stylewithcss","false"],["inserthtml","ab<b>c</b>d"]],
    "ab<b>c</b>d{}baz",
    [true,true],
    {"stylewithcss":[false,true,"",false,false,""],"inserthtml":[false,false,"",false,false,""]}],
["foo<span style=color:#aBcDeF>[bar</span>baz]",
    [["stylewithcss","true"],["inserthtml","ab<b>c</b>d"]],
    "fooab<b>c</b>d{}",
    [true,true],
    {"stylewithcss":[false,false,"",false,true,""],"inserthtml":[false,false,"",false,false,""]}],
["foo<span style=color:#aBcDeF>[bar</span>baz]",
    [["stylewithcss","false"],["inserthtml","ab<b>c</b>d"]],
    "fooab<b>c</b>d{}",
    [true,true],
    {"stylewithcss":[false,true,"",false,false,""],"inserthtml":[false,false,"",false,false,""]}],
["foo<span style=color:#aBcDeF>{bar</span>baz}",
    [["stylewithcss","true"],["inserthtml","ab<b>c</b>d"]],
    "fooab<b>c</b>d{}",
    [true,true],
    {"stylewithcss":[false,false,"",false,true,""],"inserthtml":[false,false,"",false,false,""]}],
["foo<span style=color:#aBcDeF>{bar</span>baz}",
    [["stylewithcss","false"],["inserthtml","ab<b>c</b>d"]],
    "fooab<b>c</b>d{}",
    [true,true],
    {"stylewithcss":[false,true,"",false,false,""],"inserthtml":[false,false,"",false,false,""]}],
["foo<span style=color:#aBcDeF>[bar</span><span style=color:#fEdCbA>baz]</span>quz",
    [["stylewithcss","true"],["inserthtml","ab<b>c</b>d"]],
    "fooab<b>c</b>d{}quz",
    [true,true],
    {"stylewithcss":[false,false,"",false,true,""],"inserthtml":[false,false,"",false,false,""]}],
["foo<span style=color:#aBcDeF>[bar</span><span style=color:#fEdCbA>baz]</span>quz",
    [["stylewithcss","false"],["inserthtml","ab<b>c</b>d"]],
    "fooab<b>c</b>d{}quz",
    [true,true],
    {"stylewithcss":[false,true,"",false,false,""],"inserthtml":[false,false,"",false,false,""]}],
["foo[bar]baz",
    [["inserthtml",""]],
    "foo[]baz",
    [true],
    {"inserthtml":[false,false,"",false,false,""]}],
["foo[bar]baz",
    [["inserthtml","\u0000"]],
    "foo[]baz",
    [true],
    {"inserthtml":[false,false,"",false,false,""]}],
["foo[bar]baz",
    [["inserthtml","\u0007"]],
    "foo\u0007{}baz",
    [true],
    {"inserthtml":[false,false,"",false,false,""]}],
["foo[bar]baz",
    [["stylewithcss","true"],["inserthtml","<b>"]],
    "foo<b></b>{}baz",
    [true,true],
    {"stylewithcss":[false,false,"",false,true,""],"inserthtml":[false,false,"",false,false,""]}],
["foo[bar]baz",
    [["stylewithcss","false"],["inserthtml","<b>"]],
    "foo<b></b>{}baz",
    [true,true],
    {"stylewithcss":[false,true,"",false,false,""],"inserthtml":[false,false,"",false,false,""]}],
["foo[bar]baz",
    [["stylewithcss","true"],["inserthtml","<b>abc"]],
    "foo<b>abc</b>{}baz",
    [true,true],
    {"stylewithcss":[false,false,"",false,true,""],"inserthtml":[false,false,"",false,false,""]}],
["foo[bar]baz",
    [["stylewithcss","false"],["inserthtml","<b>abc"]],
    "foo<b>abc</b>{}baz",
    [true,true],
    {"stylewithcss":[false,true,"",false,false,""],"inserthtml":[false,false,"",false,false,""]}],
["<p>foo[bar]baz",
    [["defaultparagraphseparator","div"],["inserthtml","<p>abc"]],
    "<p>foo</p><p>abc</p>{}<p>baz</p>",
    [true,true],
    {"defaultparagraphseparator":[false,false,"div",false,false,"div"],"inserthtml":[false,false,"",false,false,""]}],
["<p>foo[bar]baz",
    [["defaultparagraphseparator","p"],["inserthtml","<p>abc"]],
    "<p>foo</p><p>abc</p>{}<p>baz</p>",
    [true,true],
    {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"inserthtml":[false,false,"",false,false,""]}],
["<p>foo[bar]baz",
    [["defaultparagraphseparator","div"],["inserthtml","<li>abc"]],
    "<p>foo</p><div>abc</div>{}<p>baz</p>",
    [true,true],
    {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"inserthtml":[false,false,"",false,false,""]}],
["<p>foo[bar]baz",
    [["defaultparagraphseparator","p"],["inserthtml","<li>abc"]],
    "<p>foo</p><p>abc</p>{}<p>baz</p>",
    [true,true],
    {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"inserthtml":[false,false,"",false,false,""]}],
["<ol>{<li>foo</li>}<li>bar</ol>",
    [["defaultparagraphseparator","div"],["inserthtml","<p>abc"]],
    "<p>abc</p>{}<ol><li>bar</li></ol>",
    [true,true],
    {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"inserthtml":[false,false,"",false,false,""]}],
["<ol>{<li>foo</li>}<li>bar</ol>",
    [["defaultparagraphseparator","p"],["inserthtml","<p>abc"]],
    "<p>abc</p>{}<ol><li>bar</li></ol>",
    [true,true],
    {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"inserthtml":[false,false,"",false,false,""]}],
["<ol><li>foo</li>{<li>bar</li>}<li>baz</ol>",
    [["defaultparagraphseparator","div"],["inserthtml","<p>abc"]],
    "<ol><li>foo</li></ol><p>abc</p>{}<ol><li>baz</li></ol>",
    [true,true],
    {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"inserthtml":[false,false,"",false,false,""]}],
["<ol><li>foo</li>{<li>bar</li>}<li>baz</ol>",
    [["defaultparagraphseparator","p"],["inserthtml","<p>abc"]],
    "<ol><li>foo</li></ol><p>abc</p>{}<ol><li>baz</li></ol>",
    [true,true],
    {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"inserthtml":[false,false,"",false,false,""]}],
["<ol><li>[foo]</li><li>bar</ol>",
    [["defaultparagraphseparator","div"],["inserthtml","<p>abc"]],
    "<ol><li><p>abc</p>{}</li><li>bar</li></ol>",
    [true,true],
    {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"inserthtml":[false,false,"",false,false,""]}],
["<ol><li>[foo]</li><li>bar</ol>",
    [["defaultparagraphseparator","p"],["inserthtml","<p>abc"]],
    "<ol><li><p>abc</p>{}</li><li>bar</li></ol>",
    [true,true],
    {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"inserthtml":[false,false,"",false,false,""]}],
["<xmp>f[o]o</xmp>",
    [["inserthtml","abc"]],
    "<xmp>fabc{}o</xmp>",
    [true],
    {"inserthtml":[false,false,"",false,false,""]}],
["<xmp>f[o]o</xmp>",
    [["stylewithcss","true"],["inserthtml","<b>abc</b>"]],
    "<xmp>f<b>abc</b>{}o</xmp>",
    [true,true],
    {"stylewithcss":[false,false,"",false,true,""],"inserthtml":[false,false,"",false,false,""]}],
["<xmp>f[o]o</xmp>",
    [["stylewithcss","false"],["inserthtml","<b>abc</b>"]],
    "<xmp>f<b>abc</b>{}o</xmp>",
    [true,true],
    {"stylewithcss":[false,true,"",false,false,""],"inserthtml":[false,false,"",false,false,""]}],
["<script>f[o]o</script>bar",
    [["inserthtml","abc"]],
    "<script>fabc{}o</script>bar",
    [true],
    {"inserthtml":[false,false,"",false,false,""]}],
["<script>f[o]o</script>bar",
    [["stylewithcss","true"],["inserthtml","<b>abc</b>"]],
    "<script>f<b>abc</b>{}o</script>bar",
    [true,true],
    {"stylewithcss":[false,false,"",false,true,""],"inserthtml":[false,false,"",false,false,""]}],
["<script>f[o]o</script>bar",
    [["stylewithcss","false"],["inserthtml","<b>abc</b>"]],
    "<script>f<b>abc</b>{}o</script>bar",
    [true,true],
    {"stylewithcss":[false,true,"",false,false,""],"inserthtml":[false,false,"",false,false,""]}],
["<a>f[o]o</a>",
    [["inserthtml","<a>abc</a>"]],
    "<a>f</a><a>abc</a>{}<a>o</a>",
    [true],
    {"inserthtml":[false,false,"",false,false,""]}],
["<a href=.>f[o]o</a>",
    [["inserthtml","<a href=/>abc</a>"]],
    "<a href=\".\">f</a><a href=\"/\">abc</a>{}<a href=\".\">o</a>",
    [true],
    {"inserthtml":[false,false,"",false,false,""]}],
["<p>f[o]o",
    [["defaultparagraphseparator","div"],["inserthtml","<hr>"]],
    "<p>f</p><hr>{}<p>o</p>",
    [true,true],
    {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"inserthtml":[false,false,"",false,false,""]}],
["<p>f[o]o",
    [["defaultparagraphseparator","p"],["inserthtml","<hr>"]],
    "<p>f</p><hr>{}<p>o</p>",
    [true,true],
    {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"inserthtml":[false,false,"",false,false,""]}],
["<b>f[o]o</b>",
    [["stylewithcss","true"],["inserthtml","<hr>"]],
    "<b>f</b><hr>{}<b>o</b>",
    [true,true],
    {"stylewithcss":[false,false,"",false,true,""],"inserthtml":[false,false,"",false,false,""]}],
["<b>f[o]o</b>",
    [["stylewithcss","false"],["inserthtml","<hr>"]],
    "<b>f</b><hr>{}<b>o</b>",
    [true,true],
    {"stylewithcss":[false,true,"",false,false,""],"inserthtml":[false,false,"",false,false,""]}],
["<h1>f[o]o</h1>",
    [["inserthtml","<h2>abc</h2>"]],
    "<h1>f</h1><h2>abc</h2>{}<h1>o</h1>",
    [true],
    {"inserthtml":[false,false,"",false,false,""]}],
["<table><tr><td>f[o]o</table>",
    [["inserthtml","<td>abc</td>"]],
    "<table><tbody><tr><td>fabc{}o</td></tr></tbody></table>",
    [true],
    {"inserthtml":[false,false,"",false,false,""]}],
["f[o]o",
    [["inserthtml","<td>abc</td>"]],
    "fabc{}o",
    [true],
    {"inserthtml":[false,false,"",false,false,""]}],
["<dl><dt>f[o]o<dd>bar</dl>",
    [["inserthtml","<dt>abc</dt>"]],
    "<dl><dt>f</dt><dt>abc</dt>{}<dt>o</dt><dd>bar</dd></dl>",
    [true],
    {"inserthtml":[false,false,"",false,false,""]}],
["<dl><dt>foo<dd>b[a]r</dl>",
    [["inserthtml","<dt>abc</dt>"]],
    "<dl><dt>foo</dt><dd>b</dd><dt>abc</dt>{}<dd>r</dd></dl>",
    [true],
    {"inserthtml":[false,false,"",false,false,""]}],
["<dl><dt>f[o]o<dd>bar</dl>",
    [["inserthtml","<dd>abc</dd>"]],
    "<dl><dt>f</dt><dd>abc</dd>{}<dt>o</dt><dd>bar</dd></dl>",
    [true],
    {"inserthtml":[false,false,"",false,false,""]}],
["<dl><dt>foo<dd>b[a]r</dl>",
    [["inserthtml","<dd>abc</dd>"]],
    "<dl><dt>foo</dt><dd>b</dd><dd>abc</dd>{}<dd>r</dd></dl>",
    [true],
    {"inserthtml":[false,false,"",false,false,""]}],
["f[o]o",
    [["inserthtml","<dt>abc</dt>"]],
    "f<dl><dt>abc</dt>{}</dl>o",
    [true],
    {"inserthtml":[false,false,"",false,false,""]}],
["<ol><li>f[o]o</ol>",
    [["inserthtml","<dt>abc</dt>"]],
    "<ol><li>f<dl><dt>abc</dt>{}</dl>o</li></ol>",
    [true],
    {"inserthtml":[false,false,"",false,false,""]}],
["f[o]o",
    [["inserthtml","<dd>abc</dd>"]],
    "f<dl><dd>abc</dd>{}</dl>o",
    [true],
    {"inserthtml":[false,false,"",false,false,""]}],
["<ol><li>f[o]o</ol>",
    [["inserthtml","<dd>abc</dd>"]],
    "<ol><li>f<dl><dd>abc</dd>{}</dl>o</li></ol>",
    [true],
    {"inserthtml":[false,false,"",false,false,""]}],
["<dir><li>f[o]o</dir>",
    [["inserthtml","<li>abc</li>"]],
    "<dir><li>f</li><li>abc</li>{}<li>o</li></dir>",
    [true],
    {"inserthtml":[false,false,"",false,false,""]}],
["<ol><li>f[o]o</ol>",
    [["inserthtml","<li>abc</li>"]],
    "<ol><li>f</li><li>abc</li>{}<li>o</li></ol>",
    [true],
    {"inserthtml":[false,false,"",false,false,""]}],
["<ul><li>f[o]o</ul>",
    [["inserthtml","<li>abc</li>"]],
    "<ul><li>f</li><li>abc</li>{}<li>o</li></ul>",
    [true],
    {"inserthtml":[false,false,"",false,false,""]}],
["<dir><li>f[o]o</dir>",
    [["inserthtml","<dir><li>abc</dir>"]],
    "<dir><li>f<dir><li>abc</li></dir>{}o</li></dir>",
    [true],
    {"inserthtml":[false,false,"",false,false,""]}],
["<ol><li>f[o]o</ol>",
    [["inserthtml","<dir><li>abc</dir>"]],
    "<ol><li>f<dir><li>abc</li></dir>{}o</li></ol>",
    [true],
    {"inserthtml":[false,false,"",false,false,""]}],
["<ul><li>f[o]o</ul>",
    [["inserthtml","<dir><li>abc</dir>"]],
    "<ul><li>f<dir><li>abc</li></dir>{}o</li></ul>",
    [true],
    {"inserthtml":[false,false,"",false,false,""]}],
["<dir><li>f[o]o</dir>",
    [["inserthtml","<ol><li>abc</ol>"]],
    "<dir><li>f<ol><li>abc</li></ol>{}o</li></dir>",
    [true],
    {"inserthtml":[false,false,"",false,false,""]}],
["<ol><li>f[o]o</ol>",
    [["inserthtml","<ol><li>abc</ol>"]],
    "<ol><li>f<ol><li>abc</li></ol>{}o</li></ol>",
    [true],
    {"inserthtml":[false,false,"",false,false,""]}],
["<ul><li>f[o]o</ul>",
    [["inserthtml","<ol><li>abc</ol>"]],
    "<ul><li>f<ol><li>abc</li></ol>{}o</li></ul>",
    [true],
    {"inserthtml":[false,false,"",false,false,""]}],
["<dir><li>f[o]o</dir>",
    [["inserthtml","<ul><li>abc</ul>"]],
    "<dir><li>f<ul><li>abc</li></ul>{}o</li></dir>",
    [true],
    {"inserthtml":[false,false,"",false,false,""]}],
["<ol><li>f[o]o</ol>",
    [["inserthtml","<ul><li>abc</ul>"]],
    "<ol><li>f<ul><li>abc</li></ul>{}o</li></ol>",
    [true],
    {"inserthtml":[false,false,"",false,false,""]}],
["<ul><li>f[o]o</ul>",
    [["inserthtml","<ul><li>abc</ul>"]],
    "<ul><li>f<ul><li>abc</li></ul>{}o</li></ul>",
    [true],
    {"inserthtml":[false,false,"",false,false,""]}],
["<ul id=\"old\"><li id=\"li0\">{}<br></ul>",
    [["inserthtml","<ul id=\"new\"><li id=\"li1\">abc</li><li id=\"li2\">def</li></ul>"]],
    "<ul id=\"old\"><li id=\"li1\">abc</li><li id=\"li2\">def</li></ul>",
    [true],
    {"inserthtml":[false,false,"",false,false,""]}],
["<ol id=\"old\"><li id=\"li0\">{}<br></ol>",
    [["inserthtml","<ol id=\"new\"><li id=\"li1\">abc</li><li id=\"li2\">def</li></ol>"]],
    "<ol id=\"old\"><li id=\"li1\">abc</li><li id=\"li2\">def</li></ol>",
    [true],
    {"inserthtml":[false,false,"",false,false,""]}],
["<ul id=\"old\"><li id=\"li0\">{}<br></ul>",
    [["inserthtml","<ol id=\"new\"><li id=\"li1\">abc</li><li id=\"li2\">def</li></ol>"]],
    "<ul id=\"old\"><li id=\"li1\">abc</li><li id=\"li2\">def</li></ul>",
    [true],
    {"inserthtml":[false,false,"",false,false,""]}],
["<ol id=\"old\"><li id=\"li0\">{}<br></ol>",
    [["inserthtml","<ul id=\"new\"><li id=\"li1\">abc</li><li id=\"li2\">def</li></ul>"]],
    "<ol id=\"old\"><li id=\"li1\">abc</li><li id=\"li2\">def</li></ol>",
    [true],
    {"inserthtml":[false,false,"",false,false,""]}],
["f[o]o",
    [["defaultparagraphseparator","div"],["inserthtml","<li>abc</li>"]],
    "f<div>abc</div>{}o",
    [true,true],
    {"defaultparagraphseparator":[false,false,"p",false,false,"div"],"inserthtml":[false,false,"",false,false,""]}],
["f[o]o",
    [["defaultparagraphseparator","p"],["inserthtml","<li>abc</li>"]],
    "f<p>abc</p>{}o",
    [true,true],
    {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"inserthtml":[false,false,"",false,false,""]}],
["<nobr>f[o]o</nobr>",
    [["inserthtml","<nobr>abc</nobr>"]],
    "<nobr>f</nobr><nobr>abc</nobr>{}<nobr>o</nobr>",
    [true],
    {"inserthtml":[false,false,"",false,false,""]}],
["f[o]o",
    [["inserthtml","<nobr>abc</nobr>"]],
    "f<nobr>abc</nobr>{}o",
    [true],
    {"inserthtml":[false,false,"",false,false,""]}],
["<font color=blue>foo[]bar</font>",
    [["stylewithcss","true"],["defaultparagraphseparator","div"],["inserthtml","<p>abc"]],
    "<font color=\"blue\">foo</font><p><span style=\"color:rgb(00255)\">abc</span></p>{}<font color=\"blue\">bar</font>",
    [true,true,true],
    {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"inserthtml":[false,false,"",false,false,""]}],
["<font color=blue>foo[]bar</font>",
    [["stylewithcss","false"],["defaultparagraphseparator","div"],["inserthtml","<p>abc"]],
    "<font color=\"blue\">foo</font><p><font color=\"#0000ff\">abc</font></p>{}<font color=\"blue\">bar</font>",
    [true,true,true],
    {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"inserthtml":[false,false,"",false,false,""]}],
["<font color=blue>foo[]bar</font>",
    [["stylewithcss","true"],["defaultparagraphseparator","p"],["inserthtml","<p>abc"]],
    "<font color=\"blue\">foo</font><p><span style=\"color:rgb(00255)\">abc</span></p>{}<font color=\"blue\">bar</font>",
    [true,true,true],
    {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"inserthtml":[false,false,"",false,false,""]}],
["<font color=blue>foo[]bar</font>",
    [["stylewithcss","false"],["defaultparagraphseparator","p"],["inserthtml","<p>abc"]],
    "<font color=\"blue\">foo</font><p><font color=\"#0000ff\">abc</font></p>{}<font color=\"blue\">bar</font>",
    [true,true,true],
    {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"inserthtml":[false,false,"",false,false,""]}],
["<span style=color:blue>foo[]bar</span>",
    [["stylewithcss","true"],["defaultparagraphseparator","div"],["inserthtml","<p>abc"]],
    "<span style=\"color:rgb(00255)\">foo</span><p><span style=\"color:rgb(00255)\">abc</span></p>{}<span style=\"color:rgb(00255)\">bar</span>",
    [true,true,true],
    {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"inserthtml":[false,false,"",false,false,""]}],
["<span style=color:blue>foo[]bar</span>",
    [["stylewithcss","false"],["defaultparagraphseparator","div"],["inserthtml","<p>abc"]],
    "<span style=\"color:rgb(00255)\">foo</span><p><font color=\"#0000ff\">abc</font></p>{}<span style=\"color:rgb(00255)\">bar</span>",
    [true,true,true],
    {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"inserthtml":[false,false,"",false,false,""]}],
["<span style=color:blue>foo[]bar</span>",
    [["stylewithcss","true"],["defaultparagraphseparator","p"],["inserthtml","<p>abc"]],
    "<span style=\"color:rgb(00255)\">foo</span><p><span style=\"color:rgb(00255)\">abc</span></p>{}<span style=\"color:rgb(00255)\">bar</span>",
    [true,true,true],
    {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"inserthtml":[false,false,"",false,false,""]}],
["<span style=color:blue>foo[]bar</span>",
    [["stylewithcss","false"],["defaultparagraphseparator","p"],["inserthtml","<p>abc"]],
    "<span style=\"color:rgb(00255)\">foo</span><p><font color=\"#0000ff\">abc</font></p>{}<span style=\"color:rgb(00255)\">bar</span>",
    [true,true,true],
    {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"inserthtml":[false,false,"",false,false,""]}],
["<span style=font-variant:small-caps>foo[]bar</span>",
    [["stylewithcss","true"],["defaultparagraphseparator","div"],["inserthtml","<p>abc"]],
    "<span style=\"font-variant:small-caps\">foo</span><p>abc</p>{}<span style=\"font-variant:small-caps\">bar</span>",
    [true,true,true],
    {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"p",false,false,"div"],"inserthtml":[false,false,"",false,false,""]}],
["<span style=font-variant:small-caps>foo[]bar</span>",
    [["stylewithcss","false"],["defaultparagraphseparator","div"],["inserthtml","<p>abc"]],
    "<span style=\"font-variant:small-caps\">foo</span><p>abc</p>{}<span style=\"font-variant:small-caps\">bar</span>",
    [true,true,true],
    {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"div",false,false,"div"],"inserthtml":[false,false,"",false,false,""]}],
["<span style=font-variant:small-caps>foo[]bar</span>",
    [["stylewithcss","true"],["defaultparagraphseparator","p"],["inserthtml","<p>abc"]],
    "<span style=\"font-variant:small-caps\">foo</span><p>abc</p>{}<span style=\"font-variant:small-caps\">bar</span>",
    [true,true,true],
    {"stylewithcss":[false,false,"",false,true,""],"defaultparagraphseparator":[false,false,"div",false,false,"p"],"inserthtml":[false,false,"",false,false,""]}],
["<span style=font-variant:small-caps>foo[]bar</span>",
    [["stylewithcss","false"],["defaultparagraphseparator","p"],["inserthtml","<p>abc"]],
    "<span style=\"font-variant:small-caps\">foo</span><p>abc</p>{}<span style=\"font-variant:small-caps\">bar</span>",
    [true,true,true],
    {"stylewithcss":[false,true,"",false,false,""],"defaultparagraphseparator":[false,false,"p",false,false,"p"],"inserthtml":[false,false,"",false,false,""]}],
["<p>[foo]</p>",
    [["inserthtml"," "]],
    "<p> {}<br></p>",
    [true],
    {"inserthtml":[false,false,"",false,false,""]}],
["<p>[foo]</p>",
    [["stylewithcss","true"],["inserthtml","<span style=display:none></span>"]],
    "<p><span style=\"display:none\"></span>{}</p>",
    [true,true],
    {"stylewithcss":[false,false,"",false,true,""],"inserthtml":[false,false,"",false,false,""]}],
["<p>[foo]</p>",
    [["stylewithcss","false"],["inserthtml","<span style=display:none></span>"]],
    "<p><span style=\"display:none\"></span>{}</p>",
    [true,true],
    {"stylewithcss":[false,true,"",false,false,""],"inserthtml":[false,false,"",false,false,""]}],
["<p>[foo]</p>",
    [["inserthtml","<!--abc-->"]],
    "<p><!--abc--><br></p>",
    [true],
    {"inserthtml":[false,false,"",false,false,""]}],
["<p>{}<br></p>",
    [["inserthtml","abc"]],
    "<p>abc{}</p>",
    [true],
    {"inserthtml":[false,false,"",false,false,""]}],
["<p>{}<br></p>",
    [["inserthtml","<!--abc-->"]],
    "<p><!--abc--><br></p>",
    [true],
    {"inserthtml":[false,false,"",false,false,""]}],
["<p><!--foo-->{}<span><br></span><!--bar--></p>",
    [["inserthtml","abc"]],
    "<p><!--foo-->abc{}<!--bar--></p>",
    [true],
    {"inserthtml":[false,false,"",false,false,""]}],
["<p><!--foo-->{}<span><br></span><!--bar--></p>",
    [["inserthtml","<!--abc-->"]],
    "<p><!--foo--><!--abc-->{}<!--bar--><br></p>",
    [true],
    {"inserthtml":[false,false,"",false,false,""]}],
["<p>{}<span><!--foo--><br><!--bar--></span></p>",
    [["inserthtml","abc"]],
    "<p>abc{}</p>",
    [true],
    {"inserthtml":[false,false,"",false,false,""]}],
["<p>{}<span><!--foo--><br><!--bar--></span></p>",
    [["inserthtml","<!--abc-->"]],
    "<p><!--abc-->{}<br></p>",
    [true],
    {"inserthtml":[false,false,"",false,false,""]}],

// When selection is collapsed after an invisible <br> element, content should
// be inserted before it because inserting something after the <br> element
// makes the element visible.
["<p><br>{}</p>",
    [["inserthtml","abc"]],
    "<p>abc</p>",
    [true],
    {"inserthtml":[false,false,"",false,false,""]}],
["<p><br>{}</p>",
    [["inserthtml","<!--abc-->"]],
    ["<p><br><!--abc--></p>",
     "<p><!--abc--><br></p>"],
    [true],
    {"inserthtml":[false,false,"",false,false,""]}],
["<p><!--foo--><span><br></span>{}<!--bar--></p>",
    [["inserthtml","abc"]],
    ["<p><!--foo--><span>abc</span><!--bar--></p>",
     "<p><!--foo-->abc<!--bar--></p>"],
    [true],
    {"inserthtml":[false,false,"",false,false,""]}],
["<p><!--foo--><span><br></span>{}<!--bar--></p>",
    [["inserthtml","<!--abc-->"]],
    "<p><!--foo--><span><!--abc-->{}<br></span><!--bar--></p>",
    [true],
    {"inserthtml":[false,false,"",false,false,""]}],
// Don't insert text after the invisible <br> element. In the normal cases
// (meaning without the Comment nodes), caret should be put at the <br>.
//  Therefore, inserting text should be done before the <br>. Then, the <br>
// becomes unnecessary so that it should be removed.
["<p><span><!--foo--><br><!--bar--></span>{}</p>",
    [["inserthtml","abc"]],
    "<p><span><!--foo-->abc<!--bar--></span></p>",
    [true],
    {"inserthtml":[false,false,"",false,false,""]}],
// It may be allowed to insert new Comment after the invisible <br> element.
// Therefore, the first one expects the new position as same as the `Selection`.
// On the other hand, if the inserting content includes visible things,
// everything should be inserted before the invisible <br>.  Therefore, the
// new position can be before the <br> as same as handled as inserting visible
// things.
["<p><span><!--foo--><br><!--bar--></span>{}</p>",
    [["inserthtml","<!--abc-->"]],
    ["<p><span><!--foo--><br><!--bar--></span><!--abc--></p>",
     "<p><span><!--foo--><!--abc--><br><!--bar--></span></p>"],
    [true],
    {"inserthtml":[false,false,"",false,false,""]}],

["<pre>12[]34</pre>",
    [["inserthtml","<pre>abc</pre>"]],
    "<pre>12abc34</pre>",
    [true],
    {"inserthtml":[false,false,"",false,false,""]}],
["<pre>1[23]4</pre>",
    [["inserthtml","<pre>abc</pre>"]],
    "<pre>1abc4</pre>",
    [true],
    {"inserthtml":[false,false,"",false,false,""]}],
["<pre>[1234]</pre>",
    [["inserthtml","<pre>abc</pre>"]],
    "<pre>abc</pre>",
    [true],
    {"inserthtml":[false,false,"",false,false,""]}],
["<pre contenteditable=\"false\"><span contenteditable>[1234]</span></pre>",
    [["inserthtml","<pre>abc</pre>"]],
    ["<pre contenteditable=\"false\"><span contenteditable=\"\">abc</span></pre>",
     "<pre contenteditable=\"false\"><span contenteditable=\"\">abc</span></pre>"],
    [true],
    {"inserthtml":[false,false,"",false,false,""]}],

// Empty inline elements shouldn't be deleted if they are inserted intentionally
["<div>a[]b</div>",
    [["inserthtml","<span></span>"]],
    ["<div>a<span></span>b</div>","<div>a<span></span>b<br></div>"],
    [true],
    {"inserthtml":[false,false,"",false,false,""]}],
["<div>a[]c</div>",
    [["inserthtml","<span class=\"s1\"></span>b<span class=\"s2\"></span>"]],
    ["<div>a<span class=\"s1\"></span>b<span class=\"s2\"></span>c</div>",
     "<div>a<span class=\"s1\"></span>b<span class=\"s2\"></span>c<br></div>"],
    [true],
    {"inserthtml":[false,false,"",false,false,""]}],
["{}",
    [["inserthtml","<div class=\"d1\"></div><div class=\"d2\"><span class=\"s1\">some text</span><a href=\"foo.html\"></a></div>"]],
    "<div class=\"d1\"></div><div class=\"d2\"><span class=\"s1\">some text</span><a href=\"foo.html\"></a></div>",
    [true],
    {"inserthtml":[false,false,"",false,false,""]}],

// Do not delete non-editable when clearing the original style
["<p><b>[X]<span contenteditable=false>abc</span></b><i>def</i></p>",
    [["inserthtml","<i>Z</i>"]],
    "<p><i>Z</i><b><span contenteditable=\"false\">abc</span></b><i>def</i></p>",
    [true],
    {}],
["<p><b><span contenteditable=false>abc</span>[Y]</b><i>def</i></p>",
    [["inserthtml","<i>Z</i>"]],
    ["<p><b><span contenteditable=\"false\">abc</span></b><i>Z</i><i>def</i></p>",
     "<p><b><span contenteditable=\"false\">abc</span></b><i>Zdef</i></p>"],
    [true],
    {}],


// Some apps may refer the invisible preformatted linefeed for the further
// processing after inserting Text. Therefore, the following preformatted
// linefeed shouldn't be deleted even if it's unnecessary.
["<div style=white-space:pre>abc[]\n</div>",
    [["inserthtml","X"]],
    "<div style=\"white-space:pre\">abcX\n</div>",
    [true],
    {}],
["<div style=white-space:pre>abc[]\n</div>",
    [["inserthtml","X"],["inserthtml","Y"]],
    "<div style=\"white-space:pre\">abcXY\n</div>",
    [true,true],
    {}],
["<div style=white-space:pre-line>abc[]\n</div>",
    [["inserthtml","X"]],
    "<div style=\"white-space:pre-line\">abcX\n</div>",
    [true],
    {}],
["<div style=white-space:pre-line>abc[]\n</div>",
    [["inserthtml","X"],["inserthtml","Y"]],
    "<div style=\"white-space:pre-line\">abcXY\n</div>",
    [true,true],
    {}],
["<div style=white-space:pre>abc []\n</div>",
    [["inserthtml","X"]],
    "<div style=\"white-space:pre\">abc X\n</div>",
    [true],
    {}],
["<div style=white-space:pre>abc []\n</div>",
    [["inserthtml","X"],["inserthtml","Y"]],
    "<div style=\"white-space:pre\">abc XY\n</div>",
    [true,true],
    {}],
// I'm not sure whether the following expectations are right or consistent with
// the other results. In theory, if selection is collapsed in invisible
// white-spaces at block boundary, the invisible white-spaces should be deleted
// or at least the selection should be adjusted before the invisible
// white-spaces before inserting new content. However, insertHTML command may be
// a raw command to touch the DOM with an undo transaction. Therefore, not
// handling invisible white-spaces might be expected by the web developer.
["<div style=white-space:pre-line>abc []\n</div>",
    [["inserthtml","X"]],
    ["<div style=\"white-space:pre-line\">abcX\n</div>",
     "<div style=\"white-space:pre-line\">abcX \n</div>"],
    [true],
    {}],
["<div style=white-space:pre-line>abc []\n</div>",
    [["inserthtml","X"],["inserthtml","Y"]],
    ["<div style=\"white-space:pre-line\">abcXY\n</div>",
     "<div style=\"white-space:pre-line\">abcXY \n</div>"],
    [true,true],
    {}],
["<div style=white-space:pre>[]\n</div>",
    [["inserthtml","X"]],
    "<div style=\"white-space:pre\">X</div>",
    [true],
    {}],
["<div style=white-space:pre-line>[]\n</div>",
    [["inserthtml","X"]],
    "<div style=\"white-space:pre-line\">X</div>",
    [true],
    {}],
]

Messung V0.5 in Prozent
C=96 H=98 G=96

¤ Dauer der Verarbeitung: 0.11 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.