Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

how to create an alternative iframe element?

14 views
Skip to first unread message

rvj

unread,
Aug 11, 2010, 4:09:13 AM8/11/10
to
Should it be possible simply to create a new iframe element simply with a
different name such as xframe?

<xframe id="xframe" flex="1" src="..."/>

with a css definition such as

xframe { -moz-binding: url("chrome://..."); }

I have tried two approaches but probably have a syntax error??

1) extending the xul:iframe element
2) defining the element using the system definition


should either approach work?

****************************************

METHOD 1

<binding id="xframe" extends="xul:iframe" >
<content style="background:red" >

</content>

<handlers>
<handler event="click" action="clickxframe(event)"/>

</handlers>

<implementation>


<method name="clickxframe">

<parameter name="event"/>
<body>
<![CDATA[ alert("xframe") ]]>
</body>
</method>

</implementation>

</binding>


****************************************************

METHOD 2

<binding id="xframe">

<implementation implements="nsIAccessibleProvider">


<property name="accessibleType" readonly="true">


<getter>


<![CDATA[
return Components.interfaces.nsIAccessibleProvider.OuterDoc;
]]>


</getter>


</property>


<property name="docShell"

readonly="true"

onget="return
this.boxObject.QueryInterface(Components.interfaces.nsIContainerBoxObject).docShell"/>


<property name="contentWindow"

readonly="true"

onget="return
this.docShell.QueryInterface(Components.interfaces.nsIInterfaceRequestor).getInterface(Components.interfaces.nsIDOMWindow);"/>

<property name="webNavigation"

onget="return
this.docShell.QueryInterface(Components.interfaces.nsIWebNavigation);"

readonly="true"/>

<property name="contentDocument" readonly="true"

onget="return this.webNavigation.document;"/>

</implementation>

</binding>

0 new messages