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:
vidur%netscape.com 1999-11-25 00:06:10 +00:00
Родитель b4ed01d118
Коммит cadeecc8a4
2 изменённых файлов: 4 добавлений и 4 удалений

Просмотреть файл

@ -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;