Closed
Bug 334654
Opened 20 years ago
Closed 20 years ago
XBL bindingattached and bindingdetached events are not fired
Categories
(Core :: XBL, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: schools_ring, Unassigned)
Details
User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.8.0.2) Gecko/20060308 Firefox/1.5.0.2
Build Identifier: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.8.0.2) Gecko/20060308 Firefox/1.5.0.2
XBL bindingattached and bindingdetached events are not fired
Reproducible: Always
Steps to Reproduce:
1. HTML page:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Strict//EN"
"http://www.w3.org/TR/html401/strict.dtd">
<html>
<head>
<title>Bx2</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
html{
margin: 0px 0px;
padding: 0px 0px}
body {
margin: 0px 0px;
padding: 10px 10px;
background-color: #FFFFFF;
font: 1em Verdana, sans-serif;
color: #000000}
#TEST {
position: relative;
left: 0px; top: 0px;
width: 450px;
height: 300px;
margin: auto auto;
padding: 10px 10px;
overflow: auto;
background-color: #DDDDDD}
</style>
<script>
function init() {
var obj = document.getElementById('TEST');
document.addBinding(obj,'Bx2.xml#AJAX');
}
window.onload = init;
</script>
</head>
<body>
<div id="TEST">Initial content</div>
</body>
</html>
2. Bx2.xml file:
<?xml version="1.0"?>
<bindings
xmlns="http://www.mozilla.org/xbl"
type="text/javascript">
<binding id="AJAX" inheritstyle="true">
<implementation name="implementation">
<property name="innerText" readonly="true">
<getter><![CDATA[
return this.innerHTML;
]]></getter>
</property>
<method name="start">
<parameter name="URI"/>
<body><![CDATA[
window.alert(URI||'undefined');
]]></body>
</method>
<method name="stop">
<parameter name="rewind"/>
<body><![CDATA[
window.alert(rewind||'undefined');
]]></body>
</method>
</implementation>
<handlers>
<handler event="bindingattached"><![CDATA[
/* Executes once when the binding attached */
window.alert(this.tagName);
]]></handler>
<handler event="bindingdetached"><![CDATA[
/* Executes once when the binding detached */
window.alert(this.tagName);
]]></handler>
</handlers>
</binding>
</bindings>
Actual Results:
bindingattached handler is not called on document.addBinding
bindingattached handler is not called on -moz-binding neither
Expected Results:
bindingattached handler is called on document.addBinding
Used documentation: <http://xulplanet.com/references/elemref/ref_xblhandler.html#attr_event>
Updated•20 years ago
|
Assignee: nobody → general
Component: General → XBL
Product: Firefox → Core
QA Contact: general → ian
Version: unspecified → 1.8 Branch
Comment 1•20 years ago
|
||
There are no such events in Mozilla XBL. There's <constructor> and <destructor> instead. These events were proposed a few years ago, but never implemented (and probably never will be).
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → INVALID
(In reply to comment #1)
> There are no such events in Mozilla XBL. There's <constructor> and
> <destructor> instead. These events were proposed a few years ago, but never
> implemented (and probably never will be).
>
YMMD
I refer you to the Bug # 334618 at <https://bugzilla.mozilla.org/show_bug.cgi?id=334618> which I originally filed. So XUL Planet is the substance too in reference to XBL?
So I'd like to repeat my question then: did anyone see or hear about some document with the list (even the most primitive) of all XBL elements and methods actually implemented in Firefox 1.5.x ?
Maybe just a text/plain with a list with actual names used for elements and attributes - but coming from the Mozilla Foundation.
Otherwise it is not clear on what basis one can decide if something is not implemented or implemented but doesn't work.
Status: RESOLVED → UNCONFIRMED
Resolution: INVALID → ---
Comment 3•20 years ago
|
||
> YMMD
Huh?
> So XUL Planet is the substance too in reference to XBL?
It's generally not too bad, but I'm not aware of any fully authoritative (that is, guaranteed correct) XBL reference other than the source code.
For what it's worth, I was not quite correct. bindingattached/bindingdetached did exist back in 2001 or so. See bug 71485. Their future state remains "won't be implemented".
> Otherwise it is not clear on what basis one can decide if something is not
> implemented or implemented but doesn't work.
By filing bugs or reading the source code. :( It's a pretty unfortunate state of events.
I realize the XBL documentation sucks; the wiki version on MDC is probably the one that we should at least try to make authoritative...
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago → 20 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•