What you're suggesting is not possible, however there are other ways to set the parent content from within an iFrame.
I'd recommend you take a look at the window.parent property which allows you to manipulate the parent of the iFrame.
An example of the usage of this is:
index.html: (Parent)
<p id="test">Hello!</p>
<iframe src="otherpage.html"></iframe>
otherpage.html: (Child)
<script type="text/javascript">
window.parent.document.getElementById("test").innerHTML = "Hello World!";
</script>
This example will change Hello!
on the parent page to Hello World!
from JavaScript code executed from within the iFrame. You'll be able to manipulate the <ul>
tag this way using the innerHTML
property to add new li
tags and anything else that you wish to do with it.