зеркало из https://github.com/mozilla/pjs.git
Changed signature of AddScriptEventListener. Event handlers that are attributes of XUL elements are now compiled only when first invoked. R=joki
This commit is contained in:
Родитель
b4ed01d118
Коммит
cadeecc8a4
|
@ -1316,14 +1316,14 @@ nsXULElement::AddScriptEventListener(nsIAtom* aName, const nsString& aValue, REF
|
||||||
|
|
||||||
nsCOMPtr<nsIScriptObjectOwner> owner = do_QueryInterface(global);
|
nsCOMPtr<nsIScriptObjectOwner> owner = do_QueryInterface(global);
|
||||||
|
|
||||||
rv = manager->AddScriptEventListener(context, owner, aName, aValue, aIID);
|
rv = manager->AddScriptEventListener(context, owner, aName, aValue, aIID, PR_FALSE);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
nsCOMPtr<nsIEventListenerManager> manager;
|
nsCOMPtr<nsIEventListenerManager> manager;
|
||||||
rv = GetListenerManager(getter_AddRefs(manager));
|
rv = GetListenerManager(getter_AddRefs(manager));
|
||||||
if (NS_FAILED(rv)) return rv;
|
if (NS_FAILED(rv)) return rv;
|
||||||
|
|
||||||
rv = manager->AddScriptEventListener(context, this, aName, aValue, aIID);
|
rv = manager->AddScriptEventListener(context, this, aName, aValue, aIID, PR_TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
return rv;
|
return rv;
|
||||||
|
|
|
@ -1316,14 +1316,14 @@ nsXULElement::AddScriptEventListener(nsIAtom* aName, const nsString& aValue, REF
|
||||||
|
|
||||||
nsCOMPtr<nsIScriptObjectOwner> owner = do_QueryInterface(global);
|
nsCOMPtr<nsIScriptObjectOwner> owner = do_QueryInterface(global);
|
||||||
|
|
||||||
rv = manager->AddScriptEventListener(context, owner, aName, aValue, aIID);
|
rv = manager->AddScriptEventListener(context, owner, aName, aValue, aIID, PR_FALSE);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
nsCOMPtr<nsIEventListenerManager> manager;
|
nsCOMPtr<nsIEventListenerManager> manager;
|
||||||
rv = GetListenerManager(getter_AddRefs(manager));
|
rv = GetListenerManager(getter_AddRefs(manager));
|
||||||
if (NS_FAILED(rv)) return rv;
|
if (NS_FAILED(rv)) return rv;
|
||||||
|
|
||||||
rv = manager->AddScriptEventListener(context, this, aName, aValue, aIID);
|
rv = manager->AddScriptEventListener(context, this, aName, aValue, aIID, PR_TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
return rv;
|
return rv;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче