Search completed in 1.63 seconds.
252 results for "owner":
Your results are loading. Please wait...
XPCOM ownership guidelines
that's a sure sign of ownership.
... if you create an object with a longer lifespan, you will own it until you give ownership away.
... such a function is the perfect example of something that creates an object with a longer lifespan that itself, and gives away ownership (by producing a pointer that is already addrefed) --- in this case, to the caller.
...And 3 more matches
nsIFrameLoaderOwner
content/base/public/nsiframeloader.idlscriptable represents the owner of an nsiframeloader.
... 1.0 66 introduced gecko 1.8 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) method overview [noscript, notxpcom] alreadyaddrefed_nsframeloader getframeloader(); void swapframeloaders(in nsiframeloaderowner aotherowner); attributes attribute type description frameloader nsiframeloader the frame loader owned by this nsiframeloaderowner.
...swapframeloaders() swaps frame loaders with the given nsiframeloaderowner.
...And 2 more matches
nsIClipboardOwner
the nsiclipboardowner interface notifies the clipboard owner about the current status of ownership of the clipboard transferable at given situation and time.
... widget/public/nsiclipboardowner.idlscriptable please add a summary to this article.
... last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) inherits from: nsisupports method overview void losingownership(in nsitransferable atransferable); methods losingownership() this method notifies the owner of the clipboard transferable that the transferable is being removed from the clipboard.
... void losingownership( in nsitransferable atransferable ); parameters atransferable the transferable.
CSSStyleSheet.ownerRule - Web APIs
the read-only cssstylesheet property ownerrule returns the cssimportrule corresponding to the @import at-rule which imported the stylesheet into the document.
... syntax var ownerrule = cssstylesheet.ownerrule; value a cssimportrule corresponding to the @import rule which imported the stylesheet into the document.
... let rulelist = document.stylesheets[0].cssrules; for (let rule of rulelist) { if (!rule.ownerrule) { /* rule is not imported */ } } this snipped obtains a reference to the stylesheet associated with the @import and processes it in some manner: let rulelist = document.stylesheets[0].cssrules; for (let rule of rulelist) { if (rule.ownerrule) { checkstylesheet(rule.ownerrule.stylesheet); } } specifications specification status comment css object model (cssom)the definition of 'cssstylesheet.ownerrule' in that specification.
Node.ownerDocument - Web APIs
the ownerdocument read-only property of the node interface returns the top-level document object of the node.
... syntax var document = element.ownerdocument; value document is the top-level document object in which all the child nodes are created.
... example // given a node "p", get the top-level html // child of the document object var d = p.ownerdocument; var html = d.documentelement; specifications specification status comment domthe definition of 'node: ownerdocument' in that specification.
StyleSheet.ownerNode - Web APIs
the ownernode property of the stylesheet interface returns the node that associates this style sheet with the document.
... syntax noderef = stylesheet.ownernode example <html lang="en"> <head> <link rel="stylesheet" href="example.css"> </head> <body> <button onclick="alert(document.stylesheets[0].ownernode)">show example.css’s ownernode</button> </body> </html> // displays "object htmllinkelement" notes for style sheets that are included by other style sheets, such as with @import, the value of this property is null.
... specifications specification status comment css object model (cssom)the definition of 'stylesheet: ownernode' in that specification.
Enumerability and ownership of properties - JavaScript
ownership of properties is determined by whether the property belongs to the object directly and not to its prototype chain.
... property enumerability and ownership - built-in methods of detection, retrieval, and iteration functionality own object own object and its prototype chain prototype chain only detection enumerable nonenumerable enumerable and nonenumerable propertyisenumerable hasownproperty hasownproperty – filtered to exclude enumerables using propertyisenumerable ...
...s enumerable nonenumerable enumerable and nonenumerable for..in (excluding symbols) not available without extra code not available without extra code not available without extra code obtaining properties by enumerability/ownership note that this is not the most efficient algorithm for all cases, but useful for a quick demonstration.
Handling Mozilla Security Bugs
first, mozilla.org is appointing a security module owner charged with primary responsibility for coordinating the investigation and resolution of reported mozilla security vulnerabilities.
... the security module owner will have one or more peers to assist in this task.
... organizational structure for handling security bugs we are organizing the investigation and fixing of mozilla security vulnerabilities similar to the way mozilla project activities are handled in general: there will be a security module owner, a small core of active contributors who can act as peers to the module owner, a larger group of less active participants, and other people who may become involved from time to time.
...And 15 more matches
JavaScript Daemons Management - Archive of obsolete content
|*| http://www.gnu.org/licenses/gpl-3.0.html |*| \*/ "use strict"; /**************************** * the daemon system * ****************************/ /* the global "daemon" constructor */ function daemon (oowner, ftask, nrate, nlen, finit, fonstart) { if (!(this && this instanceof daemon)) { return; } if (arguments.length < 2) { throw new typeerror("daemon - not enough arguments"); } if (oowner) { this.owner = oowner }; this.task = ftask; if (isfinite(nrate) && nrate > 0) { this.rate = math.floor(nrate); } if (nlen > 0) { this.length = math.floor(nlen); } if (fonstart) { this.
...onstart = fonstart; } if (finit) { this.onstop = finit; finit.call(oowner, this.index, this.length, this.backw); } } /* create the daemon.blank() constructor and the global daemon.context object */ daemon.blank = function () {}; daemon.context = daemon.blank.prototype; /* make love with the gc :-) */ daemon.blank.prototype = /* important!
... */ daemon.prototype; daemon.context.constructor = object; /* these properties can be manually reconfigured after the creation of the daemon */ daemon.prototype.owner = daemon.context; daemon.prototype.task = null; daemon.prototype.rate = 100; daemon.prototype.length = infinity; daemon.prototype.reversals = 0; daemon.prototype.onstart = null; daemon.prototype.onstop = null; /* these properties should be read-only after the creation of the daemon */ daemon.prototype.session = -1; daemon.prototype.index = 0; daemon.prototype.paused = true; daemon.prototype.backw = true; /* system required daemon global object methods */ daemon.forcecall = function (odmn) { odmn.index += odmn.backw ?
...And 9 more matches
Getting Started Guide
xpcom basics: ownership and reference counting this is a quick refresher on some fundamental issues of xpcom.
...in fact, if two objects somehow end up owning each other (even transitively) it becomes difficult for either of those object to be reclaimed without adding some `out-of-band' mechanism for breaking the ownership cycle.
... the document some com ownership guidelines provides some hints on when ownership is needed.
...And 8 more matches
nsIPluginHost
void instantiatedummyjavaplugin(in nsiplugininstanceowner aowner); native code only!
... void instantiateembeddedplugin(in string amimetype, in nsiuri aurl, in nsiplugininstanceowner aowner); native code only!
... void instantiateembededplugin(in string amimetype, in nsiuri aurl, in nsiplugininstanceowner aowner); obsolete since gecko 1.8 void instantiatefullpageplugin(in string amimetype, in nsiuri auri, in nsiplugininstanceowner aowner, out nsistreamlistener astreamlistener); native code only!
...And 7 more matches
JSAutoByteString
this article covers features introduced in spidermonkey 17 take ownership of a string and free it later.
... methods method description void initbytes(char *bytes) take ownership of the given byte array.
... char *encodelatin1(jscontext *cx, jsstring *str) call js_encodestring and take ownership of the returned string, and return the string.
...And 6 more matches
Index
MozillaTechXPCOMIndex
if you have a class that you think is involved in a cyclical-ownership leak, this page is for you.
...whatever it points to has been addrefed, counting the nscomptr as one of its `owners'.
... 124 xpcom ownership guidelines xpcom ...naturally.
...And 6 more matches
Index - Web APIs
WebAPIIndex
474 cssstylesheet.ownerrule @import, api, css, cssom, cssom api, cssstylesheet, layout, object model, property, read-only, reference, stylesheet, import, ownerrule the read-only cssstylesheet property ownerrule returns the cssimportrule corresponding to the @import at-rule which imported the stylesheet into the document.
...the adopted node and its subtree is removed from its original document (if any), and its ownerdocument is changed to the current document.
... 1845 htmlobjectelement.form api, html dom, htmlobjectelement, needsexample, property, reference, form the form read-only property of the htmlobjectelement interface retuns a htmlformelement representing the object element's form owner, or null if there isn't one.
...And 6 more matches
<button>: The Button element - HTML: Hypertext Markup Language
WebHTMLElementbutton
form html5 the <form> element to associate the button with (its form owner).
...overrides the action attribute of the button's form owner.
... does nothing if there is no form owner.
...And 5 more matches
nsIDocShell
llenumerator(in long aitemtype, in long adirection); nsidomstorage getsessionstorageforprincipal(in nsiprincipal principal, in domstring documenturi, in boolean create); nsidomstorage getsessionstorageforuri(in nsiuri uri, in domstring documenturi); void historypurged(in long numentries); void internalload(in nsiuri auri, in nsiuri areferrer, in nsisupports aowner, in pruint32 aflags, in wstring awindowtarget, in string atypehint, in nsiinputstream apostdatastream, in nsiinputstream aheadersstream, in unsigned long aloadflags, in nsishentry ashentry, in boolean firstparty, out nsidocshell adocshell, out nsirequest arequest); native code only!
... void setcurrenturi(in nsiuri auri); void suspendrefreshuris(); void tabtotreeowner(in boolean forward, out boolean tookfocus); attributes attribute type description allowauth boolean certain dochshells (like the message pane) should not throw up auth dialogs because it can act as a password trojan.
... internal_load_flags_inherit_owner 0x1 used to indicate that it may be safe to inherit the owner of a javascript: or data: url from the existing document.
...And 4 more matches
Finding window handles - Archive of obsolete content
var basewindow = window.queryinterface(components.interfaces.nsiinterfacerequestor) .getinterface(components.interfaces.nsiwebnavigation) .queryinterface(components.interfaces.nsidocshelltreeitem) .treeowner .queryinterface(components.interfaces.nsiinterfacerequestor) .getinterface(components.interfaces.nsibasewindow); then in c++ part, a function take nsibasewindow as param hwnd getparentwindowhwnd(nsibasewindow *window) { nativewindow hwnd; nsresult rv = window->getparentnativewindow(&hwnd); if (ns_failed(rv)) return null; return (hwnd)hwnd; } ...
...ces.jsm'); var browserwindow = services.wm.getmostrecentwindow('navigator:browser'); if (!browserwindow) { throw new error('no browser window found'); } var basewindow = browserwindow.queryinterface(ci.nsiinterfacerequestor) .getinterface(ci.nsiwebnavigation) .queryinterface(ci.nsidocshelltreeitem) .treeowner .queryinterface(ci.nsiinterfacerequestor) .getinterface(ci.nsibasewindow); var hwndstring = basewindow.nativehandle; components.utils.import('resource://gre/modules/ctypes.jsm'); var user32 = ctypes.open('user32.dll'); /* http://msdn.microsoft.com/en-us/library/ms633539%28v=vs.85%29.aspx * bool winapi setforegroundwindow( * __in_...
...ces.jsm'); var browserwindow = services.wm.getmostrecentwindow('navigator:browser'); if (!browserwindow) { throw new error('no browser window found'); } var basewindow = browserwindow.queryinterface(ci.nsiinterfacerequestor) .getinterface(ci.nsiwebnavigation) .queryinterface(ci.nsidocshelltreeitem) .treeowner .queryinterface(ci.nsiinterfacerequestor) .getinterface(ci.nsibasewindow); var nswindowstring = basewindow.nativehandle; components.utils.import('resource://gre/modules/ctypes.jsm'); var objc = ctypes.open(ctypes.libraryname('objc')); // types let id = ctypes.voidptr_t; let sel = ctypes.voidptr_t; // constants let nil = ctypes.voidp...
...And 3 more matches
JS::SourceBufferHolder
constructor enum ownership { noownership, giveownership }; js::sourcebufferholder(const char16_t *data, size_t datalength, ownership ownership); name type description data const char16_t * source buffer containing the script to compile.
... ownership ownership see description.
...this not only groups the buffer and length values, it also provides a way to optionally pass ownership of the buffer to the js engine without copying.
...And 3 more matches
XPCOM array guide
MozillaTechXPCOMGuideArrays
ownership nsiarray xpcom object yes no no no reference counted, weak/strong nsimutablearray xpcom object yes no yes no reference counted, weak/strong nscomarray<t> xpcom object no yes yes* no reference counted, strong nstarray<t> any that has a default constructor and copy constructor no yes yes* no...
... // return it to the caller return array; } access to elements since nsiarray is a regular xpcom object, its interfaces follows the standard conventions of ownership.
...you can use the variation of ns_newstringenumerator that ensures the owner of the array outlives the enumerator.
...And 3 more matches
Introduction to using XPath in JavaScript - XPath
var nsresolver = document.creatensresolver( contextnode.ownerdocument == null ?
... contextnode.documentelement : contextnode.ownerdocument.documentelement ); or alternatively by using the <code>creatensresolver</code> method of a <code>xpathevaluator</code> object.
... <pre> var xpevaluator = new xpathevaluator(); var nsresolver = xpevaluator.creatensresolver( contextnode.ownerdocument == null ?
...And 3 more matches
Interaction between privileged and non-privileged pages - Archive of obsolete content
the information we need for that is contained in evt.target.ownerdocument.
... the code containing the callback could look like this: in the extension: var myextension = { mylistener: function(evt) { alert("received from web page: " + evt.target.getattribute("attribute1") + "/" + evt.target.getattribute("attribute2")); /* the extension answers the page*/ evt.target.setattribute("attribute3", "the extension"); var doc = evt.target.ownerdocument; var answerevt = doc.createelement("myextensionanswer"); answerevt.setattribute("part1", "answers this."); doc.documentelement.appendchild(answerevt); var event = doc.createevent("htmlevents"); event.initevent("myanswerevent", true, false); answerevt.dispatchevent(event); } } document.addeventlistener("myextensionevent", function(e) { myextension.mylistener(e...
...d {firefox: 4} with callback</button> </body> </html> overlay on browser.xul in your extension: var something = { listen_request: function(callback) { // analogue of chrome.extension.onrequest.addlistener document.addeventlistener("something-query", function(event) { var node = event.target; if (!node || node.nodetype != node.text_node) return; var doc = node.ownerdocument; callback(json.parse(node.nodevalue), doc, function(response) { node.nodevalue = json.stringify(response); var event = doc.createevent("htmlevents"); event.initevent("something-response", true, false); return node.dispatchevent(event); }); }, false, true); }, callback: function(request, sender, callback) { if (request.foo) { ...
...And 2 more matches
New Security Model for Web Services - Archive of obsolete content
mplex access lists could be created to try to establish, with finer granularity, which domains are to be accessible or permitted from which other domains, but this requires extensive management which at best is quite error-prone for the end user and easily opens holes in a firewall that do not directly hurt the user who reconfigured his browser to try to access some external service but hurts the owners of other services behind the firewall.
... controlling resource access on the server access by untrusted scripts really needs to be under the control of the stake holder, which is the resource and server owner -- not the user -- to determine whether a resource should be insulated from web applications loaded from outside of the firewall.
... delegation with mixed ownership independent owners of subdirectories cannot grant web script access to these subdirectories without getting the owner of the root directory to post a delegating access file.
...And 2 more matches
What to do and what not to do in Bugzilla
bugs covered by this exception should not be invalidated by anyone other than the module owner or module peer; for bugs involving modules like layout or content, attach a test case to the bug and then cc one of the owners or peers.
... reports of problems with specific websites that result from bad coding practices already determined to be “tech evangelism” cases by the module owner or peer, or problems that result from the use of proprietary technology, should be be moved to the tech evangelism product rather than being resolved as invalid.
...the decision to mark a bug wontfix is reserved for module owners or module peers.
...And 2 more matches
Index
a certificate contains lots of other details; for example, it contains a signature by a third party that expresses trust in the ownership relationship for the certificate.
...the preferred approach is to use certificates, and to look up certificates by properties such as the contained subject name (information that describes the owner of the certificate).
...the usual approach is to create a certificate signing request (csr) as soon as an application is done with the creation step, which will have created a handle to the key pair, and which can be used for the necessary related operations, like producing a proof-of-ownership of the private key, which is usually required when submitting the public key with a csr to a ca.
...And 2 more matches
Avoiding leaks in JavaScript XPCOM components
with this strategy, a single pointer to the object is considered the "owner" of the object and the object is deleted through that pointer.
... reference counting reference counting is a simple solution to the problem of allowing multiple owners to influence the lifetime of an object.
...in c++, we use nscomptr to help manage ownership, and we use macros to implement addref and release.
...And 2 more matches
Mozilla internal string guide
in order to avoid unnecessary copying of string data (which can have significant performance cost), the string classes support different ownership models.
... all string classes support the following three ownership models dynamically: reference counted, copy-on-write, buffers (the default) adopted buffers (a buffer that the string class owns, but is not reference counted, because it came from somewhere else) dependent buffers, that is, an underlying buffer that the string class does not own, but that the caller that constructed the string guarantees will outlive the string instance in addition, there is a special string class, ns[c]autostring, that additionally contains an internal 64-unit buffer (intended primarily for use on the stack), leading to a fourth ownership model: storage within an auto string's stack buffer auto strings will prefer reference counting an existing reference-counted buffer over their stack buffer, but will othe...
...these types are really just convenient notation for constructing an ns[c]s[ubs]tring with a non-default ownership mode; they should not be thought of as different types.
...And 2 more matches
nsIClipboard
g awhichclipboard); void forcedatatoclipboard(in long awhichclipboard); obsolete since gecko 1.8 void getdata(in nsitransferable atransferable, in long awhichclipboard); boolean hasdatamatchingflavors([array, size_is(alength)] in string aflavorlist, in unsigned long alength, in long awhichclipboard); void setdata(in nsitransferable atransferable, in nsiclipboardowner anowner, in long awhichclipboard); boolean supportsselectionclipboard(); boolean supportsfindclipboard(); constants most clipboard operations in firefox use kglobalclipboard, which is the one also used by the typical control-c/control-v keyboard shortcuts.
... methods emptyclipboard() this method empties the clipboard and notifies the clipboard owner.
... void setdata( in nsitransferable atransferable, in nsiclipboardowner anowner, in long awhichclipboard ); parameters atransferable the transferable containing the data to put on the clipboard.
...And 2 more matches
nsISHEntry
nce(components.interfaces.nsishentry); method overview void addchildshell(in nsidocshelltreeitem shell); nsidocshelltreeitem childshellat(in long index); void clearchildshells(); nsishentry clone(); void create(in nsiuri uri, in astring title, in nsiinputstream inputstream, in nsilayouthistorystate layouthistorystate, in nsisupports cachekey, in acstring contenttype, in nsisupports owner, in unsigned long long docshellid, in boolean dynamiccreation); native code only!
... nsdocshelleditordataptr forgeteditordata(); violates the xpcom interface guidelines nsicontentviewer getanycontentviewer(out nsishentry ownerentry); void getscrollposition(out long x, out long y); void getviewerbounds(in nsintrect bounds); native code only!
... owner nsisupports get the owner, if any, that was associated with the channel that the document that was loaded to create this history entry came from.
...And 2 more matches
HTML attribute reference - HTML: Hypertext Markup Language
form <button>, <fieldset>, <input>, <keygen>, <label>, <meter>, <object>, <output>, <progress>, <select>, <textarea> indicates the form that is the owner of the element.
...if this attribute is specified, it overrides the enctype attribute of the button's form owner.
...if this attribute is specified, it overrides the method attribute of the button's form owner.
...And 2 more matches
<input type="image"> - HTML: Hypertext Markup Language
WebHTMLElementinputimage
overriding default form behaviors <input type="image"> elements — like regular submit buttons — can accept a number of attributes that override the default form behavior: formaction html5 the uri of a program that processes the information submitted by the input element; overrides the action attribute of the element's form owner.
... if this attribute is specified, it overrides the enctype attribute of the element's form owner.
... if specified, this attribute overrides the method attribute of the element's form owner.
...And 2 more matches
jspage - Archive of obsolete content
:function(b){b._prototyping=true;var a=new b;delete b._prototyping;return a; },wrap:function(a,b,c){if(c._origin){c=c._origin;}return function(){if(c._protected&&this._current==null){throw new error('the method "'+b+'" cannot be called.'); }var e=this.caller,f=this._current;this.caller=f;this._current=arguments.callee;var d=c.apply(this,arguments);this._current=f;this.caller=e;return d;}.extend({_owner:a,_origin:c,_name:b}); }});class.implement({implement:function(a,d){if($type(a)=="object"){for(var e in a){this.implement(e,a[e]);}return this;}var f=class.mutators[a];if(f){d=f.call(this,d); if(d==null){return this;}}var c=this.prototype;switch($type(d)){case"function":if(d._hidden){return this;}c[a]=class.wrap(this,a,d);break;case"object":var b=c[a]; if($type(b)=="object"){$mixin(b,d);}else{c[a...
...]=$unlink(d);}break;case"array":c[a]=$unlink(d);break;default:c[a]=d;}return this;}});class.mutators={extends:function(a){this.parent=a; this.prototype=class.instantiate(a);this.implement("parent",function(){var b=this.caller._name,c=this.caller._owner.parent.prototype[b];if(!c){throw new error('the method "'+b+'" has no parent.'); }return c.apply(this,arguments);}.protect());},implements:function(a){$splat(a).each(function(b){if(b instanceof function){b=class.instantiate(b);}this.implement(b); },this);}};var chain=new class({$chain:[],chain:function(){this.$chain.extend(array.flatten(arguments));return this;},callchain:function(){return(this.$chain.length)?this.$chain.shift().apply(this,arguments):false; },clearchain:function(){this.$chain.empty();return this;}});var events=new class({$events:...
...tion(l,m){return j(this,"previoussibling","lastchild",l,false,m); },getparent:function(l,m){return j(this,"parentnode",null,l,false,m);},getparents:function(l,m){return j(this,"parentnode",null,l,true,m);},getsiblings:function(l,m){return this.getparent().getchildren(l,m).erase(this); },getchildren:function(l,m){return j(this,"nextsibling","firstchild",l,true,m);},getwindow:function(){return this.ownerdocument.window;},getdocument:function(){return this.ownerdocument; },getelementbyid:function(o,n){var m=this.ownerdocument.getelementbyid(o);if(!m){return null;}for(var l=m.parentnode;l!=this;l=l.parentnode){if(!l){return null; }}return document.id(m,n);},getselected:function(){return new elements($a(this.options).filter(function(l){return l.selected;}));},getcomputedstyle:function(m){if(this.cur...
...ar e=array.flatten(arguments).join("");var f=browser.engine.trident&&a[this.get("tag")];if(f){var g=c;g.innerhtml=f[1]+e+f[2]; for(var d=f[0];d--;){g=g.firstchild;}this.empty().adopt(g.childnodes);}else{this.innerhtml=e;}}};b.erase=b.set;return b;})();if(browser.engine.webkit&&browser.engine.version<420){element.properties.text={get:function(){if(this.innertext){return this.innertext; }var a=this.ownerdocument.newelement("div",{html:this.innerhtml}).inject(this.ownerdocument.body);var b=a.innertext;a.destroy();return b;}};}element.properties.events={set:function(a){this.addevents(a); }};native.implement([element,window,document],{addevent:function(e,g){var h=this.retrieve("events",{});h[e]=h[e]||{keys:[],values:[]};if(h[e].keys.contains(g)){return this; }h[e].keys.push(g);var f=e,a=element.even...
Introduction to cross browser testing - Learn web development
as long as the site owner is happy with this, then you have done your job.
...as a web developer, you need to agree on a range of browsers and devices that the code definitely needs to work on with the site owner, but beyond that, you need to code defensively to give other browsers the best chance possible of being able to use your content.
... initial planning in the initial planning phase, you will probably have several planning meetings with the site owner/client (this might be your boss, or someone from an external company you are building a web site for), in which you determine exactly what the web site should be — what content and functionality should it have, what should it look like, etc.
...for example, if the e-commerce site owner wants a webgl-powered 3d tour of each product built into the product pages, they will need to accept that this just won't work in ie versions before 11.
Accessible Toolkit Checklist
you will also need to provide a way for custom and owner drawn controls to easily accessibility api support, as wxwidgets does.
... there will be custom and owner drawn controls -- there always are.
... owner drawn toolkits , like xul and flash's flex ui framework use few or no native widgets.
... space bar toggles checkboxes for listboxes, use owner drawn list items to show a different highlight color when the list is not focused.
PR_Open
name value description pr_irwxu 0700 read, write, execute/search by owner.
... pr_irusr 0400 read permission, owner.
... pr_iwusr 0200 write permission, owner.
... pr_ixusr 0100 execute/search permission, owner.
An overview of NSS Internals
a certificate contains lots of other details; for example, it contains a signature by a third party that expresses trust in the ownership relationship for the certificate.
...the preferred approach is to use certificates, and to look up certificates by properties such as the contained subject name (information that describes the owner of the certificate).
...the usual approach is to create a certificate signing request (csr) as soon as an application is done with the creation step, which will have created a handle to the key pair, and which can be used for the necessary related operations, like producing a proof-of-ownership of the private key, which is usually required when submitting the public key with a csr to a ca.
...the signature is verified if it can be shown that the signature data block must have been produced by the owner of the public key (because only that owner has the associated private key).
JS::AutoIdArray
this article covers features introduced in spidermonkey 17 take ownership of a jsidarray and free it later.
... ida jsidarray * a pointer to jsidarray to take the ownership.
... jsidarray *steal() return the owned array and release the ownership.
... description js::autoidarray takes the ownership of jsidarray, and frees it in destructor by calling js_destroyidarray.
Interfacing with the XPCOM cycle collector
if you have a class that you think is involved in a cyclical-ownership leak, this page is for you.
...this way the collector builds a picture of the ownership subgraph reachable from suspicious objects.
... note that the collector also knows how to walk through the js heap, and can locate ownership cycles that pass in and out of it.
...or your class may have a complicated ownership structure, such that the simple ns_impl_cycle_collection_n macros are insufficient; in this case you might need to implement the traverse and unlink methods of your helper class manually.
XPCOM
if you have a class that you think is involved in a cyclical-ownership leak, this page is for you.introduction to xpcom for the domwarning: this document has not yet been reviewed by the dom gurus, it might contain some errors.language bindingsan xpcom language binding is a bridge between a particular language and xpcom to provide access to xpcom objects from that language, and to let modules written in that language be used as xpcom objects by all other languag...
...it allows developers to link only against the frozen xpcom method symbols and maintain compatibility with multiple versions of xpcom.xpcom guidethese articles provide tutorials and usage documentation for xpcom, including how to use it in your own projects and how to build xpcom components for your firefox add-ons and the like.xpcom ownership guidelines...naturally.
...that's a sure sign of ownership.
... if you create an object with a longer lifespan, you will own it until you give ownership away.xpcom referencethis reference describes the interfaces and functions provided by the xpcom library.
Attr - Web APIs
WebAPIAttr
ownerelement read only the element holding the attribute.
... ownerdocument you shouldn't have been using this in the first place, so you probably don't care that this is going away.
... living standard added ownerelement property back dom4the definition of 'attr' in that specification.
... obsolete moved namespaceuri, prefix and localname from node to this api and removed ownerelement, schematypeinfo and isid.
CSSStyleSheet - Web APIs
ownerrule read only if this stylesheet is imported into the document using an @import rule, the ownerrule property returns the corresponding cssimportrule; otherwise, this property's value is null.
...a specific style sheet can also be accessed from its owner object (node or cssimportrule), if any.
... stylesheets list getting the owner element/rule given the style sheet object the interface for the owner object getting the cssstylesheet object from the owner <style> and <link> elements in the document yes .ownernode htmllinkelement, htmlstyleelement, or svgstyleelement .sheet css @import rule in other style sheets applied to the document yes .ownerrule cssimportrule .s...
...tylesheet <?xml-stylesheet ?> processing instruction in the (non-html) document yes .ownernode processinginstruction .sheet http link header yes n/a n/a n/a user agent (default) style sheets no n/a n/a n/a specifications specification status comment css object model (cssom)the definition of 'cssstylesheet' in that specification.
Working with objects - JavaScript
for example, suppose you define an object called person as follows: function person(name, age, sex) { this.name = name; this.age = age; this.sex = sex; } and then instantiate two new person objects as follows: var rand = new person('rand mckinnon', 33, 'm'); var ken = new person('ken jones', 39, 'm'); then, you can rewrite the definition of car to include an owner property that takes a person object, as follows: function car(make, model, year, owner) { this.make = make; this.model = model; this.year = year; this.owner = owner; } to instantiate the new objects, you then use the following: var car1 = new car('eagle', 'talon tsi', 1993, rand); var car2 = new car('nissan', '300zx', 1992, ken); notice that instead of passing a literal string or in...
...teger value when creating the new objects, the above statements pass the objects rand and ken as the arguments for the owners.
... then if you want to find out the name of the owner of car2, you can access the following property: car2.owner.name note that you can always add a property to a previously defined object.
...so, the full definition of car would now look like function car(make, model, year, owner) { this.make = make; this.model = model; this.year = year; this.owner = owner; this.displaycar = displaycar; } then you can call the displaycar method for each of the objects as follows: car1.displaycar(); car2.displaycar(); using this for object references javascript has a special keyword, this, that you can use within a method to refer to the current object.
XPath snippets - XPath
function evaluatexpath(anode, aexpr) { var xpe = new xpathevaluator(); var nsresolver = xpe.creatensresolver(anode.ownerdocument == null ?
... anode.documentelement : anode.ownerdocument.documentelement); var result = xpe.evaluate(aexpr, anode, nsresolver, 0, null); var found = []; var res; while (res = result.iteratenext()) found.push(res); return found; } this function uses the new xpathevaluator() constructor, which is supported in firefox, chrome, opera and safari, but not in edge or internet explorer.
... scripts in a web document which might be accessed by edge or internet explorer users should replace the call to new xpathevaluator() with the following fragment: // xpathevaluator is implemented on objects that implement document var xpe = anode.ownerdocument || anode; in that case the creation of the xpathnsresolver can be simplified as: var nsresolver = xpe.creatensresolver(xpe.documentelement); note however that creatensresolver should only be used if you are sure the namespace prefixes in the xpath expression match those in the document you want to query (and that no default namespace is being used (though see document.creatensresolver for a workaround)).
...context.ownerdocument : document); resolver = resolver || null; context = context || doc; result = doc.evaluate(expr, context, resolver, xpathresult.ordered_node_snapshot_type, null); for(i = 0; i < result.snapshotlength; i++) { a[i] = result.snapshotitem(i); } return a; } getxpathforelement the following function allows one to pass an element and an xml document to find a ...
Promises - Archive of obsolete content
yield db.executecached( "insert into nodes (id, owner, key, value) \ values (:id, :owner, :key, :value);", { params: { id: node.id, owner: node.owner.id, key: node.key, value: node.value }}); }); // perform a bulk update.
... yield db.execute( "update owners, nodes \ set owners.name = nodes.name \ where owners.id = nodes.owner and nodes.key = 'name';"); // process some results.
... yield db.execute( "select owners.group as group, nodes.value as task \ from nodes \ inner join owners on owner.id = nodes.owner \ where nodes.key = 'task';", { onrow: row => { runtask(row.getresultbyname("task"), row.getresultbyname("group")); } }); // and quickly grab a single row value.
Migrate apps from Internet Explorer to Mozilla - Archive of obsolete content
ownerdocument returns the document object containing the current node.
... documentfragment transformtofragment(node source, document owner) transforms the node source by applying the stylesheet imported using the importstylesheet method and generates a documentfragment.
... owner specifies what dom document the documentfragment should belong to, making it appendable to that dom document.
Mozilla release FAQ - Archive of obsolete content
on www.mozilla.org, there is a list of module 'owners'.
...check for for the module owner, and contact him/her.
... the specific area that you can find this is on the mozilla owners document.
Contributing to the Mozilla code base
let the bug submitter, reviewer, and component owner know that you'd like to work on the bug.
...the reviewer in those bugs might be another good choice we have a list of modules, which lists peers and owners for the module.
...in a worst case scenario, set the module owner as the reviewer, asking them in the comments to pick someone more suitable please select only one reviewer.
OS.File.Info
epresents a directory } else if (info.issymlink) { // |somepath| represents a symbolic link } else { // |somepath| represents a regular file } }, function onfailure(reason) { if (reason instanceof os.file.error && reason.becausenosuchfile) { // |somepath| does not represent anything } else { // some other error } } ) example: determining the owner of a file let promise = os.file.stat() promise.then( function onsuccess(info) { if ("unixowner" in info) { // info.unixowner holds the owner of the file } else { // information is not available on this platform } } ); evolution of this example bug 802534 will introduce the ability to check whether field unixowner appears in os.file.info.prototype, which will ...
... platform-specific attributes unix unixowner a number holding the identifier of the unix owner of this file.
...is any write/set of inode information (such as owner, group, link count, mode, etc).
Localizing with Mercurial
the localization team owner needs to file a bug requesting an hg account.
...write access to the hg repositories requires a ''voucher'', which, for the owner, will be done based on the review by mozilla.
... for peers of a localization, the owner can vouch (once she or he is registered).
NSPR Contributor Guide
we (the nspr module owners) sometimes disappoint our contributors when we must reject their contributions.
...see also: xxx ownership of your contribution when you contribute something to nspr, you must have intellectual property rights to that contribution.
...[note that the current nspr module owners do not now nor never have been involved with nspr 1.0.].
PR_MkDir
read by owner.
...write by owner.
...search by owner.
Index
23 js::autoidarray jsapi reference, reference, référence(2), spidermonkey js::autoidarray takes the ownership of jsidarray, and frees it in destructor by calling js_destroyidarray.
...this not only groups the buffer and length values, it also provides a way to optionally pass ownership of the buffer to the js engine without copying.
... 86 jsautobytestring jsapi reference, reference, référence(2), spidermonkey jsautobytestring takes the ownership of string and frees it in destructor.
Finishing the Component
before attempting to use unfrozen interfaces, you should contact the developers who are responsible for the code you're trying to use (i.e., module owners) and ask them how best to do what you are trying to do.
...an interface reaches this state when a group of module owners and peers are actively engaged in discussion about how best to expose it.
...even with interfaces marked "under review," however, it's still a good idea to contact the module owners responsible for the interfaces you are interested in using.
nsIDOMStorageManager
implemented by @mozilla.org/dom/storagemanager;1 as a service: var domstoragemanager = components.classes["@mozilla.org/dom/storagemanager;1"] .getservice(components.interfaces.nsidomstoragemanager); method overview void clearofflineapps(); nsidomstorage getlocalstorageforprincipal(in nsiprincipal aprincipal, in domstring adocumenturi); long getusage(in astring aownerdomain); methods clearofflineapps() clears keys owned by offline applications.
...usage is checked against the domain of the page that set the key (the owner domain), not the domain of the storage object.
... long getusage( astring aownerdomain ); parameters aownerdomain the domain to check.
nsIFrameLoader
this will clear the weak owner content reference.
...this method figures out what to load from the owner content in the frame loader.
... see also content process event handling nsiframeloaderowner nsiframemessagelistener nsichromeframemessagemanager nsidomwindowutils ...
Mailnews and Mail code review requirements
rules for all patches affecting mailnews/ and mail/ wherever possible, significant patches in a certain area should be reviewed by one of the listed sub-module owner/reviewers.
... the author of the patch is the module owner or a peer of the module to which the test corresponds.
... (i have done some mozmill orange fixing where the try server would not duplicate the orange failures of the trunk and so in order to get the enhanced logging, the changes need to go into the trunk.) the patch is authored by the module owner/a peer for the affected test.
WindowOrWorkerGlobalScope.setInterval() - Web APIs
|*| http://www.gnu.org/licenses/lgpl-3.0.html |*| \*/ function minidaemon (oowner, ftask, nrate, nlen) { if (!(this && this instanceof minidaemon)) { return; } if (arguments.length < 2) { throw new typeerror('minidaemon - not enough arguments'); } if (oowner) { this.owner = oowner; } this.task = ftask; if (isfinite(nrate) && nrate > 0) { this.rate = math.floor(nrate); } if (nlen > 0) { this.length = math.floor(nlen); } } minidaemon.prototype.owner = null; minidaem...
...-1 : 1; if (odmn.task.call(odmn.owner, odmn.index, odmn.length, odmn.backw) === false || odmn.isatend()) { odmn.pause(); return false; } return true; }; /* instances methods */ minidaemon.prototype.isatend = function () { return this.backw ?
... minidaemon instances properties mydaemon.owner the this object on which is executed the daemon (read/write).
<textarea> - HTML: Hypertext Markup Language
WebHTMLElementtextarea
if the autocomplete attribute is not specified on a <textarea> element, then the browser uses the autocomplete attribute value of the <textarea> element's form owner.
... the form owner is either the <form> element that this <textarea> element is a descendant of or the form element whose id is specified by the form attribute of the input element.
... form the form element that the <textarea> element is associated with (its "form owner").
new operator - JavaScript
t property that is itself another object suppose you define an object called person as follows: function person(name, age, sex) { this.name = name; this.age = age; this.sex = sex; } and then instantiate two new person objects as follows: var rand = new person('rand mcnally', 33, 'm'); var ken = new person('ken jones', 39, 'm'); then you can rewrite the definition of car to include an owner property that takes a person object, as follows: function car(make, model, year, owner) { this.make = make; this.model = model; this.year = year; this.owner = owner; } to instantiate the new objects, you then use the following: var car1 = new car('eagle', 'talon tsi', 1993, rand); var car2 = new car('nissan', '300zx', 1992, ken); instead of passing a literal string or integer value ...
...when creating the new objects, the above statements pass the objects rand and ken as the parameters for the owners.
... to find out the name of the owner of car2, you can access the following property: car2.owner.name specifications specification ecmascript (ecma-262)the definition of 'the new operator' in that specification.
Tabbed browser - Archive of obsolete content
tabbrowser.selectedtab = currenttab; // focus *this* browser window in case another one is currently focused tabbrowser.ownerdocument.defaultview.focus(); found = true; } } if (!found) { // our tab isn't open.
... var browserenumerator = wm.getenumerator("navigator:browser"); var tabbrowser = browserenumerator.getnext().gbrowser; // create tab var newtab = tabbrowser.addtab(url); newtab.setattribute(attrname, "xyz"); // focus tab tabbrowser.selectedtab = newtab; // focus *this* browser window in case another one is currently focused tabbrowser.ownerdocument.defaultview.focus(); } } the function can be called like so: openandreuseonetabperattribute("myextension-myattribute", "http://developer.mozilla.org/").
Layout System Overview - Archive of obsolete content
the presentation shell is the root of the presentation, and as such it owns and manages a lot of layout objects that are used to create and maintain a presentation (note that the documentviewer is the owner of the presentation shell, and in some cases the creator of the objects used by the presentation shell to manage the presentation.
...the presentation shell, or presshell, is first and foremost the owner of the formatting objects, the frames.
Mozilla Crypto FAQ - Archive of obsolete content
new contributions of crypto code should also be reviewed and approved by the appropriate mozilla module owners, just as with any other mozilla contributions.
...see the mozilla open source pki projects pages for the names and email addresses of the mozilla module owners for crypto-related code.
Plugin Architecture - Archive of obsolete content
nsobjectframe the frame responsible for displaying plugins nsplugininstanceowner glue between plugin code (modules/plugin) and layout code (layout/generic).
...(the event is necessary because by the time hasnewframe is called, the frame isn't fully set up yet) in layout note: some of this should move to content an instance owner is created the window passed to the plugin is adjusted (the npwindow, http://devedge-temp.mozilla.org/libr...nt.html#999221) the plugin host is asked to instantiate the plugin this will call back to the instance owner / the object frame in order to create a widget to draw to (if the plugin is not windowless) nsplugininstanceowner::setwindow setwindow is called on the plugin ...
Table Cellmap - Border Collapse - Archive of obsolete content
border for the top and left border we store the width and the owner of the border.
...the following owners are possible: etableowner = 0, ecolgroupowner = 1, eajacolgroupowner = 2, // col group to the left ecolowner = 3, eajacolowner = 4, // col to the left erowgroupowner = 5, eajarowgroupowner = 6, // row group above erowowner = 7, eajarowowner = 8, // row above ecellowner = 9, eajacellowner = 10 // cell to the top or to the left the ownership is determined by the rules for border conflict resolution as defined in css 2.1 corner for the corner we store the corner ownership, defined by the orientation of the major edge relative to the corner that goes into that corner.
Getting File Information - Archive of obsolete content
in this case, the first digit is the permissions for the owner of the file, the second digit is the permissions for the group of the file and the third digit is the permissions for everyone else.
... the default permissions for files when created through an output stream is 0644, which means that the file is readable and writable by the owner of the file and read only for others.
tabbrowser - Archive of obsolete content
addtab( url, referreruri, charset, postdata, owner, allowthirdpartyfixup ) addtab( url, {referreruri: ..., charset: ..., postdata: ..., owner: ..., allowthirdpartyfixup: ..., relatedtocurrent: ...
...there's also no owner parameter as the owner tab is specified automatically.
Domain - MDN Web Docs Glossary: Definitions of Web-related terms
"developer" is a "sub-domain", something you as the owner of a domain may define yourself.
... many owners choose to have a subdomain "www" to point to their world_wide_web resource, but that's not required (and has even fallen somewhat out of favor).
Public-key cryptography - MDN Web Docs Glossary: Definitions of Web-related terms
this means that anyone can verify a signature, but only the owner of the corresponding private key could have generated it.
...anyone could encrypt a message to the owner of the private key, but only the owner of the private key could decrypt it.
What is a URL? - Learn web development
as the resource represented by the url and the url itself are handled by the web server, it is up to the owner of the web server to carefully manage that resource and its associated url.
...each web server has its own rules regarding parameters, and the only reliable way to know if a specific web server is handling parameters is by asking the web server owner.
HTML table basics - Learn web development
LearnHTMLTablesBasics
first the source code: <table> <tr> <td>&nbsp;</td> <td>knocky</td> <td>flor</td> <td>ella</td> <td>juan</td> </tr> <tr> <td>breed</td> <td>jack russell</td> <td>poodle</td> <td>streetdog</td> <td>cocker spaniel</td> </tr> <tr> <td>age</td> <td>16</td> <td>9</td> <td>10</td> <td>5</td> </tr> <tr> <td>owner</td> <td>mother-in-law</td> <td>me</td> <td>me</td> <td>sister-in-law</td> </tr> <tr> <td>eating habits</td> <td>eats everyone's leftovers</td> <td>nibbles at food</td> <td>hearty eater</td> <td>will eat till he explodes</td> </tr> </table> now the actual rendered table: knocky flor ella juan breed jack russell poodl...
...e streetdog cocker spaniel age 16 9 10 5 owner mother-in-law me me sister-in-law eating habits eats everyone's leftovers nibbles at food hearty eater will eat till he explodes the problem here is that, while you can kind of make out what's going on, it is not as easy to cross reference data as it could be.
mach
mozilla operates with a modules governance system where there are different components with different owners.
...the mach core is the only thing that could fall under perview of a module and an owner.
Embedding the editor
the problem with this ownership model is that there can be only one editor per <editor> tag, yet the document loaded in the <iframe> may itself contain multiple <iframe>s (consider a frameset document, or a document itself containing an <html:iframe>).
... decide on how to implement editing session multiple-editor support eliminate specific interdependencies between composer and the xul document, via nsieditoruserinterface create bottleneck for getting to the focussed editor; ensure that focus changes update state move editor ownership to docshell, creating nsieditorframe created the editing session api which copes with collections of editors (or make editor refocussable) open questions where should file open and save logic live?
CustomizableUI.jsm
customizableui.createwidget({ id: 'id_of_my_widget_within_customizableui_and_dom', defaultarea: customizableui.area_navbar, label: 'my widget', // type: 'button', //we don't need to type this, the default type is button tooltiptext: 'this is my widget created with cui.jsm', oncommand: function(aevent) { var thisdomwindow = aevent.target.ownerdocument.defaultview; //this is the browser (xul) window var thiswindowsselectedtabswindow = thisdomwindow.gbrowser.selectedtab.linkedbrowser.contentwindow; //this is the html window of the currently selected tab thiswindowsselectedtabswindow.alert('alert from html window of selected tab'); thisdomwindow.alert('alert from xul window'); } }); giving the button an icon n...
...odules/customizableui.jsm'); customizableui.createwidget({ id: 'id_of_my_widget_within_customizableui_and_dom', defaultarea: customizableui.area_navbar, label: 'my widget', // type: 'button', //we don't need to type this, the default type is button tooltiptext: 'this is my widget created with cui.jsm', oncommand: function(aevent) { var thisdomwindow = aevent.target.ownerdocument.defaultview; //this is the browser (xul) window var thiswindowsselectedtabswindow = thisdomwindow.gbrowser.selectedtab.linkedbrowser.contentwindow; //this is the html window of the currently selected tab thiswindowsselectedtabswindow.alert('alert from html window of selected tab'); thisdomwindow.alert('alert from xul window'); } }); //end - use customizableui.j...
PromiseWorker.jsm
atransferlist optional an optional array of transferable objects to transfer ownership of.
... if the ownership of an object is transferred, it becomes unusable (neutered) in the context it was sent from, and it becomes available only to the worker it was sent to.
Leak-hunting strategies and tips
build with --enable-trace-malloc common leak patterns when trying to find a leak of reference-counted objects, there are a number of patterns that could cause the leak: ownership cycles.
... the most common source of hard-to-fix leaks is ownership cycles.
PR_PushIOLayer
some subtle ramifications: the ownership of the storage pointed to by the caller's layer argument is relinquished to the runtime.
... accessing the object via the pointer is not permitted while the runtime has ownership.
Invariants
most jscontext pointers must point to live contexts, but jstitle::ownercx may point to one that has been destroyed!
... so code must check js_validcontextpointer(ownercx) before dereferencing it.
XML Extras
if you'd like to help out with qa, you can do one of the following: sign up as the qa owner for any of the implemented components.
... the qa owner will manage the tests associated with their component, act as qa contact for related bugs and help with regression testing.
An Overview of XPCOM
the nsisupports base interface two fundamental issues in component and interface-based programming are component lifetime, also called object ownership, and interface querying, or being able to identify which interfaces a component supports at runtime.
... object ownership in xpcom, since components may implement any number of different interfaces, components must be reference counted.
nsIChannel
note: this is distinctly different from the http referer (referring uri), which is typically the page that contained the original uri (accessible from nsihttpchannel.) owner nsisupports the owner, corresponding to the entity that is responsible for this channel.
... note: this is a strong reference to the owner, so if the owner is also holding a strong reference to the channel, care must be taken to explicitly drop its reference to the channel.
nsIFile
if attribute data cannot be recreated (like the file owner if you don't have enough privileges, or acl data if moving to a non-acl volume), then those attributes will be lost.
... if attribute data cannot be recreated (like the file owner if you don't have enough privileges, or acl data if moving to a non-acl volume), then those attributes will be lost.
nsIInProcessContentFrameMessageManager
1.0 66 introduced gecko 2.0 inherits from: nsicontentframemessagemanager last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) method overview nsicontent getownercontent(); violates the xpcom interface guidelines methods violates the xpcom interface guidelines getownercontent() nsicontent getownercontent(); parameters none.
... return value the nsicontent object representing the owner's content.
nsIThreadPool
the thread pool takes ownership of the listener and releases it when the shutdown() method is called.
... threads created after the listener is set will also take ownership of the listener so that the listener will be kept alive long enough to receive the guaranteed nsithreadpoollistener.onthreadshuttingdown() notification.
XPCOM Interface Reference
eentrydescriptornsicacheentryinfonsicachelistenernsicachemetadatavisitornsicacheservicensicachesessionnsicachevisitornsicachingchannelnsicancelablensicategorymanagernsichannelnsichanneleventsinknsichannelpolicynsicharsetresolvernsichromeframemessagemanagernsichromeregistrynsiclassinfonsiclipboardnsiclipboardcommandsnsiclipboarddragdrophooklistnsiclipboarddragdrophooksnsiclipboardhelpernsiclipboardownernsicollectionnsicommandcontrollernsicommandlinensicommandlinehandlernsicommandlinerunnernsicomponentmanagernsicomponentregistrarnsicompositionstringsynthesizernsiconsolelistenernsiconsolemessagensiconsoleservicensicontainerboxobjectnsicontentframemessagemanagernsicontentprefnsicontentprefcallback2nsicontentprefobservernsicontentprefservicensicontentprefservice2nsicontentsecuritypolicynsicontentsni...
...acallbacknsifaviconservicensifeednsifeedcontainernsifeedelementbasensifeedentrynsifeedgeneratornsifeedpersonnsifeedprocessornsifeedprogresslistenernsifeedresultnsifeedresultlistenernsifeedtextconstructnsifilensifileinputstreamnsifileoutputstreamnsifilepickernsifileprotocolhandlernsifilespecnsifilestreamsnsifileurlnsifileutilitiesnsifileviewnsifocusmanagernsiformhistory2nsiframeloadernsiframeloaderownernsiframemessagelistenernsiframemessagemanagernsiframescriptloadernsigsettingscollectionnsigsettingsservicensigeolocationprovidernsigeolocationupdatensiglobalhistorynsiglobalhistory2nsiglobalhistory3nsihtmleditornsihttpheaderlistenernsihapticfeedbacknsihttpactivitydistributornsihttpactivityobservernsihttpchannelnsihttpchannelinternalnsihttpheadervisitornsihttpservernsihttpupgradelistenernsiidnservi...
XPCOM Interface Reference by grouping
nsitreecolumn nsitreecolumns nsitreecontentview nsitreeselection nsitreeview xform nsixformsmodelelement nsixformsnsinstanceelement nsixformsnsmodelelement xmlhttprequest nsixmlhttprequesteventtarget favicon nsifavicondatacallback nsifaviconservice frame nsichromeframemessagemanager nsiframeloader nsiframeloaderowner nsiframemessagelistener nsiframemessagemanager interface nsijsxmlhttprequest jetpack nsijetpack nsijetpackservice offlinestorage nsiapplicationcache nsiapplicationcachechannel nsiapplicationcachecontainer nsiapplicationcachenamespace nsiapplicationcacheservice places nsiannotationobserver rss feed nsifeed ...
...ectionimageservice chrome nsisearchengine nsisearchsubmission nsiwebbrowserchrome nsiwindowcreator nsiwindowmediator nsiwindowwatcher clipboard nsiclipboard nsiclipboardcommands nsiclipboarddragdrophooklist nsiclipboarddragdrophooks nsiclipboardhelper nsiclipboardowner core action nsitransactionmanager process nsiprocess nsiprocess2 thread nsithread nsithreadeventfilter nsithreadinternal nsithreadmanager nsithreadobserver nsithreadpool ...
Using the clipboard
please note: the sourcewindow variable is a placeholder for whatever window owns the data being copied -- from any dom element you can obtain it via element.ownerdocument.defaultview.
...the second parameter can usually be set to null but you could set it to an nsiclipboardowner so that you can tell when the data you've copied is overwritten by another copy operation.
XPIDL
for types that reference heap-allocated data (strings, arrays, interface pointers, etc), you must follow the xpidl data ownership conventions in order to avoid memory corruption and security vulnerabilities: for in parameters, the caller allocates and deallocates all data.
... for out parameters, the callee creates the data, and transfers ownership to the caller.
DOMException - Web APIs
unknownerror the operation failed for an unknown transient reason (e.g.
...adds the notreadableerror, unknownerror, constrainterror, dataerror, transactioninactiveerror, readonlyerror, versionerror, operationerror, and notallowederror values.
DedicatedWorkerGlobalScope.postMessage() - Web APIs
transferlist optional an optional array of transferable objects to transfer ownership of.
... if the ownership of an object is transferred, it becomes unusable (neutered) in the context it was sent from and it becomes available only to the main thread it was sent to.
Document.adoptNode() - Web APIs
the adopted node and its subtree is removed from its original document (if any), and its ownerdocument is changed to the current document.
... for more on the node.ownerdocument issues, see the w3c dom faq.
MessagePort.postMessage() - Web APIs
the postmessage() method of the messageport interface sends a message from the port, and optionally, transfers ownership of objects to other browsing contexts.
... transferlist optional transferable objects to be transferred — these objects have their ownership transferred to the receiving browsing context, so are no longer usable by the sending browsing context.
Node - Web APIs
WebAPINode
node.ownerdocumentread only returns the document that this node belongs to.
... obsolete the ownerdocument property was slightly modified so that documentfragment also returns null.
Viewpoints and viewers: Simulating cameras in WebXR - Web APIs
note: most diagrams used in this article to show how the camera moves while performing standard movements was taken from an article on the filmmakeriq web site; namely, from this image which is found all over the web, however, and though we assume these are under a permissive license due to their frequent reuse, ownership is not certain.
... we hope that it's freely usable; if not, and you're the owner, please let us know and we'll find or produce new diagrams.
Using Web Workers - Web APIs
passing data by transferring ownership (transferable objects) google chrome 17+ and firefox 18+ contain an additional way to pass certain types of objects (transferable objects, that is objects implementing the transferable interface) to or from a worker with high performance.
...its ownership is transferred to the new context.
Worker.prototype.postMessage() - Web APIs
transfer optional an optional array of transferable objects to transfer ownership of.
... if the ownership of an object is transferred, it becomes unusable (neutered) in the context it was sent from and becomes available only to the worker it was sent to.
Using XMLHttpRequest - Web APIs
submitting..."); */ submitdata (odata); } function pushsegment (ofrevt) { this.owner.segments[this.segmentidx] += ofrevt.target.result + "\r\n"; this.owner.status--; processstatus(this.owner); } function plainescape (stext) { /* how should i treat a text/plain form encoding?
...(sfieldtype === "file" && ofield.files.length > 0) { if (this.technique === 3) { /* enctype is multipart/form-data */ for (nfile = 0; nfile < ofield.files.length; nfile++) { ofile = ofield.files[nfile]; osegmreq = new filereader(); /* (custom properties:) */ osegmreq.segmentidx = this.segments.length; osegmreq.owner = this; /* (end of custom properties) */ osegmreq.onload = pushsegment; this.segments.push("content-disposition: form-data; name=\"" + ofield.name + "\"; filename=\"" + ofile.name + "\"\r\ncontent-type: " + ofile.type + "\r\n\r\n"); this.status++; osegmreq.readasbinarystring(ofile); } } e...
XSLTProcessor - Web APIs
[throws] documentfragment xsltprocessor.transformtofragment(node source, document owner) transforms the node source by applying the stylesheet imported using the xsltprocessor.importstylesheet() function.
... the owner document of the resulting document fragment is the owner node.
Implementing a Microsoft Active Accessibility (MSAA) Server - Accessibility
to fix this for standard listboxes, use owner drawn list items, so that you can change the highlight color when an item doesn't have focus.
...one downside to this solution is that means that you cannot use "client data" for the list items, because windows won't allow owner drawn list items to use client data.
Content categories - Developer guides
form-associated content form-associated content comprises elements that have a form owner, exposed by a form attribute.
... a form owner is either the containing <form> element or the element whose id is specified in the form attribute.
Writing forward-compatible websites - Developer guides
for example, if you have this markup: <div onclick="alert(ownerdocument)">click me</div> then clicking on the text alerts the ownerdocument of the div.
... this happens even if there is a var ownerdocument declared in global scope.
core/namespace - Archive of obsolete content
let sandboxes = ns(); function widget(options) { let { element, contentscript } = options; let widget = object.create(widget.prototype); view.call(widget, options.element); sandboxes(widget).sandbox = cu.sandbox(element.ownerdocument.defaultview); // ...
tabs/utils - Archive of obsolete content
getownerwindow(tab) get the browser window that owns the specified tab.
IsDefaultNamespace - Archive of obsolete content
return false; // unknown; } case 9: // document_node return isdefaultnamespace(node.documentelement, namespaceuri); case 6: // entity_node case 12: // notation_node case 10: // document_type_node case 11: // document_fragment_node return false; // unknown case 2: // attribute_node: if (node.ownerelement ) { return isdefaultnamespace(node.ownerelement , namespaceuri); } else { return false; // unknown } default: if (node.parentnode) { // entityreferences may have to be skipped to get to it return isdefaultnamespace(node.parentnode, namespaceuri); } els...
LookupNamespaceURI - Archive of obsolete content
return null; case 9: // document_node return lookupnamespaceurihelper(node.documentelement, prefix); case 6: // entity_node case 12: // notation_node case 10: // document_type_node case 11: // document_fragment_node return null; // unknown case 2: // attribute_node if (node.ownerelement) { return lookupnamespaceurihelper(node.ownerelement, prefix); } return null; // unknown default: // text_node (3), cdata_section_node (4), entity_reference_node (5), // processing_instruction_node (7), comment_node (8) if (node.parentnode) { // entityreferences m...
LookupPrefix - Archive of obsolete content
/ node.element_node return _lookupnamespaceprefix(namespaceuri, node); case 9: // node.document_node return _lookupnamespaceprefix(namespaceuri, node.documentelement); case 6: // node.entity_node case 12: // node.notation_node case 11: // node.document_fragment_node case 10: // node.document_type_node return null; // type is unknown case 2: // node.attribute_node if (node.ownerelement) { return _lookupnamespaceprefix(namespaceuri, node.ownerelement); } return null; default: if (node.parentnode) { // entityreferences may have to be skipped to get to it return _lookupnamespaceprefix(namespaceuri, node.parentnode); } return null; } } // private function for lookupprefix only function _lookupnamespaceprefix (namespaceuri, originalelement) { ...
How to convert an overlay extension to restartless - Archive of obsolete content
.queryinterface(components.interfaces.nsifileurl) .file; var stream = components.classes["@mozilla.org/network/file-input-stream;1"] .createinstance(components.interfaces.nsifileinputstream) .queryinterface(components.interfaces.nsiseekablestream); stream.init(file, 0x01, 0444, 0); // read-only, read by owner/group/others, normal behavior /* do stuff */ }); this bit of code is paraphrased and probably not to be recommended as-is, but it should work.
Appendix F: Monitoring DOM changes - Archive of obsolete content
style = components.utils.getweakreference(style); return function unwatch() { if (style.get()) { style.get().ownerdocument.removeeventlistener('animationstart', listener, false); style.get().parentnode.removechild(style.get()); } }; } watchnodes.namespace = 'mozcsskeyframerule' in window ?
Intercepting Page Loads - Archive of obsolete content
// find the root document: while (doc.defaultview.frameelement) { doc = doc.defaultview.frameelement.ownerdocument; } } } } the second if validation is necessary if you need to make a distinction for html documents being loaded in inner page frames.
Local Storage - Archive of obsolete content
let localdir = directoryservice.get("profd", ci.nsifile); localdir.append("xulschool"); if (!localdir.exists() || !localdir.isdirectory()) { // read and write permissions to owner and group, read-only for others.
Getting the page URL in NPAPI plugin - Archive of obsolete content
this returns an addrefed nsidomelement interface pointer from which you can call .ownerdocument (on nsidomnode), queryinterface that object to nsidom3document, and call .documenturi.
Index - Archive of obsolete content
362 spidermonkey coding conventions javascript, spidermonkey the spidermonkey project owners enforce coding conventions pretty strictly during code reviews.
SpiderMonkey coding conventions - Archive of obsolete content
the spidermonkey project owners enforce coding conventions pretty strictly during code reviews.
Archived SpiderMonkey docs - Archive of obsolete content
between resolving conflicts, finding a good time to land, watching the tree, and marking bugs as fixed, it takes around half a day.spidermonkey coding conventionsthe spidermonkey project owners enforce coding conventions pretty strictly during code reviews.
Supporting per-window private browsing - Archive of obsolete content
as an example, if an add-on adds a context menu item that accesses an api that requires an nsiloadcontext, the most relevant window is the one that owns the element being targeted by the context menu (element.ownerdocument.defaultview).
Anonymous Content - Archive of obsolete content
all anonymous nodes' ownerdocument pointers are set to the bound document at the time of generation.
DOM Interfaces - Archive of obsolete content
if (element.ownerdocument instanceof ci.nsidomdocumentxbl) { var anonchildren = element.ownerdocument.getanonymousnodes(element); if (anonchildren) { for (var i = 0; i < anonchildren.length; i++) { if (anonchildren[i].nodetype == 1) return false; } } } return true; ...
addTab - Archive of obsolete content
ArchiveMozillaXULMethodaddTab
« xul reference home addtab( url, referreruri, charset, postdata, owner, allowthirdpartyfixup ) addtab( url, {referreruri: ..., charset: ..., postdata: ..., owner: ..., allowthirdpartyfixup: ..., relatedtocurrent: ...
loadOneTab - Archive of obsolete content
there's also no owner parameter as the owner tab is specified automatically.
Property - Archive of obsolete content
:element.clientleft dom:element.clienttop dom:element.clientwidth dom:element.clonenode dom:element.firstchild dom:element.firstelementchild dom:element.lastchild dom:element.lastelementchild dom:element.localname dom:element.namespaceuri dom:element.nextelementsibling dom:element.nextsibling dom:element.nodename dom:element.nodetype dom:element.nodevalue dom:element.ownerdocument dom:element.parentnode dom:element.prefix dom:element.previouselementsibling dom:element.previoussibling dom:element.scrollheight dom:element.scrollleft dom:element.scrolltop dom:element.scrollwidth dom:element.tagname dom:element.textcontent ...
Toolbars - Archive of obsolete content
mailing list newsgroup rss feed #extdev irc channel mozillazine forum about:addons newsletter mozilla's web-tech blog mozdev project owners planet mozilla other community links...
Using Remote XUL - Archive of obsolete content
ozilla.org/newsbot/" /> </menupopup> </menu> <menu label="developer docs"> <menupopup> <menuitem label="roadmap" value="https://www.mozilla.org/roadmap.html" /> <menuitem label="projects" value="https://www.mozilla.org/projects/" /> <menuitem label="ports" value="https://www.mozilla.org/ports/" /> <menuitem label="module owners" value="https://www.mozilla.org/owners.html" /> <menuitem label="hacking" value="https://www.mozilla.org/hacking/" /> <menuitem label="get the source" value="https://www.mozilla.org/source.html" /> <menuitem label="build it" value="https://www.mozilla.org/build/" /> </menupopup> </menu> <menu label="testing"> <menupopup> <menu...
The Implementation of the Application Object Model - Archive of obsolete content
because the file lives remotely, it can be updated whenever the owner of the web site sees fit.
2006-10-27 - Archive of obsolete content
the owner of the site probably browsed on the releases/2.0 dir on the ftp and got the releases, which is kind of unpolite.
2006-11-24 - Archive of obsolete content
feedback on l10n:ownership draft feedback on the l10n:ownership draft at mozilla wiki site detailed here.
2006-12-01 - Archive of obsolete content
feedback on l10n:ownership draft feedback on the l10n:ownership draft at mozilla wiki site detailed here continues.
2006-12-01 - Archive of obsolete content
he requests blocker bug owners get their patches in asap and since check approval will be granted daily that they be ready to check their patches in as soon as they are approved.
2006-11-24 - Archive of obsolete content
module owner for mozilla/testing - tim needs suggestions on who to promote as a moderator (to replace davel).
2006-11-10 - Archive of obsolete content
summary: mozilla.dev.tech.xpcom - oct 04-nov 10, 2006 announcements xptcall changes in process - ports owners needed if you maintain an xptcall port, you are needed to submit a patch to that bug 349002 with xptcall updates.
NPN_GetValue - Archive of obsolete content
in many cases, a plug-in may still have to create its own window (a transparent child window of the browser window) to act as the owner window for popup menus and modal dialogs.
NPObject - Archive of obsolete content
to aid with the reference counting and ownership management in general, the functions npn_createobject(), npn_retainobject(), npn_releaseobject(), and npn_releasevariantvalue() are provided as part of this api.
NPP_Destroy - Archive of obsolete content
ownership of the buf field of the npsaveddata structure passes from the plug-in to the browser when npp_destroy returns.
NPP_New - Archive of obsolete content
if non-null, the browser passes ownership of the npsaveddata object back to the plug-in.
Digital Signatures - Archive of obsolete content
once you have signed some data, it is difficult to deny doing so later, assuming that the private key has not been compromised or out of the owner's control.
Packages - Archive of obsolete content
examples example: javascript function to create a java dialog box the following javascript function creates a java dialog box: function createwindow() { var theowner = new packages.java.awt.frame(); var thewindow = new packages.java.awt.dialog(theowner); thewindow.setsize(350, 200); thewindow.settitle("hello, world"); thewindow.setvisible(true); } in the previous example, the function instantiates thewindow as a new packages object.
XForms Custom Controls - Archive of obsolete content
var control = this; var refreshstub = function() { control.refresh(); } this.ref1.refresh = refreshstub; this.ref2.refresh = refreshstub; </constructor> <property name="ref1" readonly="true" onget="return this.ownerdocument.getanonymouselementbyattribute(this, 'anonid', 'ref1');"/> <property name="ref2" readonly="true" onget="return this.ownerdocument.getanonymouselementbyattribute(this, 'anonid', 'ref2');"/> </implementation> new host language the mozilla xforms implementation currently only supports xforms hosted in xhtml or xul documents.
Mozilla XForms Specials - Archive of obsolete content
that is, if instancenode is a node in an instance document, then: instancenode.getfeature("org.mozilla.xforms.instanceowner", "1.0") will return the <instance> element (in the main document) that the node belongs to.
Choosing Standards Compliance Over Proprietary Practices - Archive of obsolete content
following proprietary de facto standards leaves an organization vulnerable and open to obsolescence when the owner of the de facto changes focus or direction, or abandons the de facto altogether and renders the standard stagnate.
Community - Extensions
mozillazine extensions & themes forum #extdev channel on moznet irc network — extension development questions #addons channel on moznet irc network — questions about http://addons.mozilla.org mozdev project owners mailing list mozillazine knowledge base allyourideas — ideas for extensions ((really needs a unique captcha)) babelzilla — a community for developers and translators of extension for mozilla applications ...
Distributed Denial of Service - MDN Web Docs Glossary: Definitions of Web-related terms
the infected computers' owners normally don't know that their computers have been compromised, and they also suffer loss of service.
Index - MDN Web Docs Glossary: Definitions of Web-related terms
all device owners receiving a given set of updates are on the same "channel", and each device often can access several channels (e.g.
OTA - MDN Web Docs Glossary: Definitions of Web-related terms
all device owners receiving a given set of updates are on the same "channel", and each device often can access several channels (e.g.
Search engine - MDN Web Docs Glossary: Definitions of Web-related terms
a web site owner can exclude areas of the site from being accessed by a search engine's web crawler (or spider), by defining "robot exclusion" information in a file named robots.txt.
TLD - MDN Web Docs Glossary: Definitions of Web-related terms
depending on how strict an administrating organization might be, tld often serves as a clue to the purpose, ownership, or nationality of a website.
Styling web forms - Learn web development
website owners want form styles that fit in with their overall site design more than ever, and the web platform has changed to make this more possible.
Images in HTML - Learn web development
you have received explicit, written permission from the image owner.
From object to iframe — other embedding technologies - Learn web development
never display content on your webpage unless you own it or the owners have given you written, unequivocal permission.
Mozilla accessibility architecture
therefore, ownership is reversed -- accessible nodes own their dom objects.
Mozilla Plugin Accessibility
problem planned solution owner targeted completion 1.
Frequently Asked Questions for Lightweight themes
do i still retain ownership over artwork that i upload?
Adding a new event
eventnamelist.h defines mapping between dom event name, internal event message, event handler attribute owner and internal event class.
Reviewer Checklist
threading issues enormous: correct use of locking and volatility; livelock and deadlock; ownership.
Developer guide
mozilla modules and module ownership this article provides information about mozilla's modules, what the role of a module owner is, and how module owners are selected.
Communicating with frame scripts
an xpcom component), you can access the window of the browser that sent the message with message.target.ownerdocument.defaultview.
Performance
g; }) funtion getmaincopy() { return maincopy; } // framescript.js components.utils.import("resource://my-addon/processmodule.jsm") // getmaincopy() used by other functions don't register observers (and other callbacks to global services) in a frame script bad: //framescript.js services.obs.addobserver("document-element-inserted", { observe: function(doc, topic, data) { if(doc.ownerglobal.top != content) return; // bail out if this is for another tab decoratedocument(doc); } }) observer notifications get fired for events that happen anywhere in the browser, they are not scoped to the current tab.
Storage access policy: Block cookies from trackers
debugging we encourage site owners to test their sites, particularly those that rely on third-party content integrations.
Getting Started with Chat
/mode #channel +o nickname sets specified user as an owner or moderator of the specified channel.
IME handling guide
imestatemanager works more complicated because imestatemanagers in each processe need to negotiate about owner ship of managing input context.
IPDL Type Serialization
serializers and deserializers are security-sensitive and must always receive two reviews from module owners who understand ipc serialization well.
Localization content best practices
# localization note(generalsiteidentity): %1$s is the owner of the current website, # %2$s is the name of the certification authority signing the certificate.
Writing localizable code
the addition of new top-level directories is a compromise between module ownership in the cvsroot repository and the ease of localization.
Mozilla Port Blocking
lla: protocol handler allowed ports ftp 21, 22 ldap 389, 636 nntp any port pop3 any port imap any port smtp any port finger 79 datetime 13 how to change mozilla port blocking permanently since each protocol can determine which ports are blocked, you should contact the protocol handler owner to request that a specific port be blocked or unblocked.
TraceMalloc
(a strongly connected component with only one node is listed as a single object.) any single object listed as a root is really a leak root, and any component listed as a root either (a) contains an object that is a root or (b) contains objects that form an ownership cycle that is a root.
NSS 3.46 release notes
hangs on windows x64 when building nss since changeset 9162c654d06915f0f15948fbf67d4103a229226f bug 1564875 - improve rebuilding with build.sh bug 1565243 - support tc_owner without email address in nss taskgraph bug 1563778 - increase maxruntime on mac taskcluster tools, ssl tests bug 1561591 - remove -wmaybe-uninitialized warning in tstclnt.c bug 1561587 - remove -wmaybe-uninitialized warning in lgattr.c bug 1561558 - remove -wmaybe-uninitialized warning in httpserv.c bug 1561556 - remove -wmaybe-uninitialized warning in tls13esni.c bug 1561332 - ec.c:28 warn...
NSS tools : certutil
-s subject identify a particular certificate owner for new certificates or certificate requests.
NSS Tools certutil
-s subject identify a particular certificate owner for new certificates or certificate requests.
certutil
-s subject identify a particular certificate owner for new certificates or certificate requests.
Rhino license
in no event shall the copyright owner or * contributors be liable for any direct, indirect, incidental, special, * exemplary, or consequential damages (including, but not limited to, * procurement of substitute goods or services; loss of use, data, or * profits; or business interruption) however caused and on any theory of * liability, whether in contract, strict liability, or tort (including * negligence or otherwise) arising ...
Exact Stack Rooting
this means it must be manually traced by the object's owner: this is both fragile and more expensive than using an extra reserved slot, or even just putting a new property on the object.
A Web PKI x509 certificate primer
assumptions: you are the domain owner of *.example.com and *.example.net.
extIPreferenceBranch
the root branch is set based on the context of the owner.
Resources
p://ftp.mozilla.org/pub/mozilla/releases/mozilla1.4a/gecko-sdk-i686-pc-linux-gnu-1.4a.tar.gz windows: http://ftp.mozilla.org/pub/mozilla/releases/mozilla1.4a/gecko-sdk-win32-1.4a.zip other mozilla downloads gecko resources internal string guide external string guide the gecko networking library ("necko") the netscape portable runtime environment embedding mozilla current module owners xpinstall xul xpcom resources the xpcom project page xulplanet's online xpcom reference information on xpconnect and scriptable components the smart pointer guide xpidl xpidl compiler reference general development resources the world wide web consortium url specification at the w3 gnu make « previous copyright (c) 2003 by doug turner and ian oeschger.
Starting WebLock
nsmemory for cross-component boundaries weblock maintains ownership of all the memory it allocates, so you can use just about any allocator that you want for weblock, but this is not always the case.
Introduction to XPCOM for the DOM
more about this in the xpcom ownership guide.
inIDOMUtils
return value void setcontentstate() sets the given element as the current owner of the specified state, and removes that state from the previous owner.
nsIAccessNode
obsolete since gecko 2.0 ownerwindow voidptr the os window handle for the window this node is being displayed in.
nsIAccessibleRetrieval
this node is either from bindings chain if given node is anonymous and owner binding denies accessible in anonymous content or given node (it's not important whether it is accessible or not).
nsIContentViewer
if it is non-null, the document will not be destroyed, and the following actions will happen when destroy() is called: sanitize() will be called on the viewer's document the content viewer will set the contentviewer property on the history entry, and release its reference (ownership reversal).
nsIDOMNode
nodevalue domstring ownerdocument nsidomdocument read only.
nsIDirectoryService
call unregisterprovider() to force the directory service to relinquish ownership of a particular provider instance.
nsISHistory
in a non-embedded situation, the owner of the session history component must create a instance of it and set it in the nsiwebnavigation object.
nsITransferable
widget/nsitransferable.idlscriptable a container for typed data that can be transferred from one place or owner to another, possibly involving format conversion.
nsIWindowMediator
win.queryinterface(components.interfaces.nsiinterfacerequestor) .getinterface(components.interfaces.nsiwebnavigation) .queryinterface(components.interfaces.nsidocshelltreeitem).treeowner .queryinterface(components.interfaces.nsiinterfacerequestor) .getinterface(components.interfaces.nsixulwindow) enumerating windows the following code can be used if you need to do something for each open window of a particular type.
nsIWindowWatcher
this component should not keep a (xpcom) reference to any windows; the implementation will claim no ownership.
nsIXPConnect
3) the xpcom object implements nsiscriptobjectowner; i.e., is an idlc style dom object for which we can call getscriptobject to get the jsobject it uses to represent itself into javascript.
NS_CStringContainerInit2
instead, the string takes ownership over the data pointer.
Frequently Asked Questions
some com ownership guidelines.
Weak reference
see also the source xpcom/base/nsiweakreference.idl xpcom/glue/nsweakreference.h xpcom/glue/nsweakreference.cpp xpcom ownership guidelines using nscomptr original document information author: scott collins last updated date: september 23, 2000 copyright information: portions of this content are © 1998–2007 by individual mozilla.org contributors; content available under a creative commons license | details.
XPCOM tasks
building ownership models that work (see xpcom ownership guidelines), using raw pointers, nscomptr (see the nscomptr user's manual), nsiweakreference (see nsiweakreference), nscweakreference, and (across threads) proxies (see nsisupports proxies).
WebIDL bindings
for example, nsinode::getparentobject returns the node's owner document.
Drawing and Event Handling - Plugins
in many cases, a plug-in may still have to create its own window (a transparent child window of the the browser window) to act as the owner window for pop-up menus and modal dialog boxes.
Initialization and Destruction - Plugins
ownership of the buf field of the npsaveddata structure passes from the plug-in to the browser when npp_destroy returns.
Browser Console - Firefox Developer Tools
on windows, the following code will add a new item to the browser's main menu: var parent = window.document.getelementbyid("appmenuprimarypane"); var makethetea = gbrowser.ownerdocument.defaultview.document.createelementns("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul", "menuitem"); makethetea.setattribute("label", "a nice cup of tea?"); parent.appendchild(makethetea); on macos, this similar code will add a new item to the "tools" menu: var parent = window.document.getelementbyid("menu_toolspopup"); var makethetea = gbrowser.ownerdocument.defaultview.d...
Using channel messaging - Web APIs
an object, the ownership of which is transferred to the receiving browsing context.
Channel Messaging API - Web APIs
sed through the messagechannel.port1 and messagechannel.port2 properties (which both return messageport objects.) the app that created the channel uses port1, and the app at the other end of the port uses port2 — you send a message to port2, and transfer the port over to the other browsing context using window.postmessage along with two arguments (the message to send, and the object to transfer ownership of, in this case the port itself.) when these transferable objects are transferred, they are 'neutered' on the previous context — the one they previously belonged to.
ChildNode.replaceWith() - Web APIs
thpolyfill() { 'use-strict'; // for safari, and ie > 10 var parent = this.parentnode, i = arguments.length, currentnode; if (!parent) return; if (!i) // if there are no arguments parent.removechild(this); while (i--) { // i-- decrements i and returns the value of i before the decrement currentnode = arguments[i]; if (typeof currentnode !== 'object'){ currentnode = this.ownerdocument.createtextnode(currentnode); } else if (currentnode.parentnode){ currentnode.parentnode.removechild(currentnode); } // the value of "i" below is after the decrement if (!i) // if currentnode is the first argument (currentnode === arguments[0]) parent.replacechild(currentnode, this); else // if currentnode isn't the first parent.insertbefore(currentnod...
Client.postMessage() - Web APIs
the ownership of these objects is given to the destination side and they are no longer usable on the sending side.
Constraint validation API - Web APIs
extensions to other interfaces the constraint validation api extends the interfaces for the form-associated elements listed below with a number of new properties and methods (elements that can have a form attribute that indicates their form owner): htmlbuttonelement htmlfieldsetelement htmlinputelement htmlobjectelement htmloutputelement htmlselectelement htmltextareaelement properties validity a read-only property that returns a validitystate object, whose properties represent validation errors for the value of that element.
Document.importNode() - Web APIs
for more on the node.ownerdocument issues, see the w3c dom faq.
Introduction to the DOM - Web APIs
data type (interface) description document when a member returns an object of type document (e.g., the ownerdocument property of an element returns the document to which it belongs), this object is the root document object itself.
Element.closest() - Web APIs
WebAPIElementclosest
if (window.element && !element.prototype.closest) { element.prototype.closest = function(s) { var matches = (this.document || this.ownerdocument).queryselectorall(s), i, el = this; do { i = matches.length; while (--i >= 0 && matches.item(i) !== el) {}; } while ((i < 0) && (el = el.parentelement)); return el; }; } specifications specification status comment domthe definition of 'element.closest()' in that specification.
Element.getAttributeNode() - Web APIs
you can, however, get the element to which the attribute belongs with the ownerelement property.
Element.matches() - Web APIs
WebAPIElementmatches
ent.queryselectorall(), a polyfill exists: if (!element.prototype.matches) { element.prototype.matches = element.prototype.matchesselector || element.prototype.mozmatchesselector || element.prototype.msmatchesselector || element.prototype.omatchesselector || element.prototype.webkitmatchesselector || function(s) { var matches = (this.document || this.ownerdocument).queryselectorall(s), i = matches.length; while (--i >= 0 && matches.item(i) !== this) {} return i > -1; }; } however, given the practicality of supporting older browsers, the following should suffice for most (if not all) practical cases (i.e.
GlobalEventHandlers.oninvalid - Web APIs
the validity of submittable elements is checked before submitting their owner form, or after the checkvalidity() method of the element or its owner form is called.
HTMLFormElement - Web APIs
named inputs are added to their owner form instance as properties, and can overwrite native properties if they share the same name (e.g.
HTMLInputElement: invalid event - Web APIs
the validity of submittable elements is checked before submitting their owner <form>, or after the checkvalidity() method of the element or its owner <form> is called.
HTMLKeygenElement - Web APIs
form read only is a htmlformelement that indicates the control's form owner, reflecting the form html attribute if it is defined.
HTMLObjectElement.form - Web APIs
the form read-only property of the htmlobjectelement interface retuns a htmlformelement representing the object element's form owner, or null if there isn't one.
HTMLObjectElement - Web APIs
htmlobjectelement.form read only retuns a htmlformelement representing the object element's form owner, or null if there isn't one.
HTML Drag and Drop API - Web APIs
function dragstart_handler(ev) { // add different types of drag data ev.datatransfer.setdata("text/plain", ev.target.innertext); ev.datatransfer.setdata("text/html", ev.target.outerhtml); ev.datatransfer.setdata("text/uri-list", ev.target.ownerdocument.location.href); } for a list of common data types used in drag-and-drop (such as text, html, links, and files), see recommended drag types.
IDBRequest.error - Web APIs
WebAPIIDBRequesterror
unknownerror if the operation failed for reasons unrelated to the database itself.
IDBTransaction.error - Web APIs
it can be a reference to the same error as the request object that raised it, or a transaction failure (for example quotaexceedederror or unknownerror).
ImageBitmapRenderingContext.transferFromImageBitmap() - Web APIs
the ownership of the imagebitmap is transferred to the canvas as well.
ImageBitmapRenderingContext - Web APIs
ownership of the imagebitmap is transferred to the canvas.
MediaRecorder.onerror - Web APIs
unknownerror an non-security related error occurred that cannot otherwise be categorized.
MediaRecorder.start() - Web APIs
unknownerror something else went wrong during the recording process.
MessagePort - Web APIs
methods inherits methods from its parent, eventtarget postmessage() sends a message from the port, and optionally, transfers ownership of objects to other browsing contexts.
Navigator.deviceMemory - Web APIs
it is then clamped within lower and upper bounds to protect the privacy of owners of very low- or high-memory devices.
Node.isConnected - Web APIs
WebAPINodeisConnected
*/ if (!('isconnected' in node.prototype)) { object.defineproperty(node.prototype, 'isconnected', { get() { return ( !this.ownerdocument || !( this.ownerdocument.comparedocumentposition(this) & this.document_position_disconnected ) ); }, }); } specifications specification status comment domthe definition of 'isconnected' in that specification.
OffscreenCanvas - Web APIs
a call to imagebitmaprenderingcontext.transferfromimagebitmap() with the previously rendered and saved imagebitmap from the offscreencanvas, will display the imagebitmap on the canvas and transfer its ownership to the canvas.
PaymentAddress.country - Web APIs
syntax var paymentcountry = paymentaddress.country; value a domstring which contains the iso3166-1 alpha-2 code identifying the country in which the address is located, or an empty string if no country is available, which frequently can be assumed to mean "same country as the site owner." usage notes if the payment handler validates the address and determines that the value of country is invalid, a call to paymentrequestupdateevent.updatewith() will be made with a details object containing a shippingaddresserrors field.
Range.compareNode() - Web APIs
WebAPIRangecompareNode
the following function can be used as replacement: function rangecomparenode(range, node) { var noderange = node.ownerdocument.createrange(); try { noderange.selectnode(node); } catch (e) { noderange.selectnodecontents(node); } var nodeisbefore = range.compareboundarypoints(range.start_to_start, noderange) == 1; var nodeisafter = range.compareboundarypoints(range.end_to_end, noderange) == -1; if (nodeisbefore && !nodeisafter) return 0; if (!nodeisbefore && nodeisafter) return 1; ...
ReadableStreamBYOBReader.cancel() - Web APIs
exceptions typeerror the source object is not a readablestreambyobreader, or the stream has no owner.
ReadableStreamBYOBReader.read() - Web APIs
exceptions typeerror the source object is not a readablestreambyobreader, the stream has no owner, the view is not an object or has become detached, or the view's length is 0.
ReadableStreamDefaultReader.cancel() - Web APIs
exceptions typeerror the source object is not a readablestreamdefaultreader, or the stream has no owner.
ReadableStreamDefaultReader.read() - Web APIs
exceptions typeerror the source object is not a readablestreamdefaultreader, or the stream has no owner.
SVGElement - Web APIs
svgelement.ownersvgelementread only an svgsvgelement referring to the nearest ancestor <svg> element.
Storage Access API - Web APIs
in the case of breakage, site owners have often encouraged users to add their site as an exception or to disable the policy entirely.
StyleSheet.title - Web APIs
WebAPIStyleSheettitle
the title is often specified in the ownernode.
StyleSheet - Web APIs
stylesheet.ownernode read only returns a node associating this style sheet with the current document.
Touch events - Web APIs
var touch = null; switch (evt.type) { case "touchstart": type = "mousedown"; touch = evt.changedtouches[0]; break; case "touchmove": type = "mousemove"; touch = evt.changedtouches[0]; break; case "touchend": type = "mouseup"; touch = evt.changedtouches[0]; break; } newevt.initmouseevent(type, true, true, evt.originaltarget.ownerdocument.defaultview, 0, touch.screenx, touch.screeny, touch.clientx, touch.clienty, evt.ctrlkey, evt.altkey, evt.shiftkey, evt.metakey, 0, null); evt.originaltarget.dispatchevent(newevt); } calling preventdefault() only on a second touch one technique for preventing things like pinchzoom on a page is to call preventdefault() on the second touch in a series.
window.location - Web APIs
WebAPIWindowlocation
ame > nframes) { clearinterval(_scrollid); _scrollid = -1; return; } _isbot = true; document.documentelement.scrolltop = math.round(_scrolly + (_nodey - _scrolly) * _itframe / nframes); document.documentelement.scrollleft = math.round(_scrollx + (_nodex - _scrollx) * _itframe / nframes); if (_usehash && _itframe === nframes) { location.hash = _bookmark; } _itframe++; } function _chkowner () { if (_isbot) { _isbot = false; return; } if (_scrollid > -1) { clearinterval(_scrollid); _scrollid = -1; } } if (window.addeventlistener) { window.addeventlistener("scroll", _chkowner, false); } else if (window.attachevent) { window.attachevent("onscroll", _chkowner); } return function (sbookmark, busehash) { var onode = document.queryselector(sbookmark); _scrolly = docume...
window.postMessage() - Web APIs
the ownership of these objects is given to the destination side and they are no longer usable on the sending side.
WritableStreamDefaultWriter.write() - Web APIs
exceptions typeerror the target stream is not a writable stream, or it does not have an owner.
How to check the security state of an XMLHTTPRequest over SSL - Web APIs
was the used ssl certificate valid and what are its details (owner, expiration, certificate authority, etc.)?
Understanding the Web Content Accessibility Guidelines - Accessibility
use wcag 2.1 to help more people with disabilities and reduce the future legal risk for web site owners.
The HTML autocomplete attribute - HTML: Hypertext Markup Language
if an <input>, <select> or <textarea> element has no autocomplete attribute, then browsers use the autocomplete attribute of the element's form owner, which is either the <form> element that the element is a descendant of, or the <form> whose id is specified by the form attribute of the element.
HTML attribute: rel - HTML: Hypertext Markup Language
WebHTMLAttributesrel
the nofollow relationship may indicate the current document's owner does not endorse the referenced document.
<input>: The Input (Form Input) element - HTML: Hypertext Markup Language
WebHTMLElementinput
form a string specifying the <form> element with which the input is associated (that is, its form owner).
<keygen> - HTML: Hypertext Markup Language
WebHTMLElementkeygen
form the form element that this element is associated with (its form owner).
<meter>: The HTML Meter element - HTML: Hypertext Markup Language
WebHTMLElementmeter
form the <form> element to associate the <meter> element with (its form owner).
<object> - HTML: Hypertext Markup Language
WebHTMLElementobject
formhtml5 the form element, if any, that the object element is associated with (its form owner).
<output>: The Output element - HTML: Hypertext Markup Language
WebHTMLElementoutput
form the <form> element to associate the output with (its form owner).
<select>: The HTML Select element - HTML: Hypertext Markup Language
WebHTMLElementselect
form the <form> element to associate the <select> with (its form owner).
Choosing between www and non-www URLs - HTTP
a recurring question among website owners is whether to choose non-www or www urls.
Identifying resources on the Web - HTTP
each web server has its own rules regarding parameters, and the only reliable way to know how a specific web server is handling parameters is by asking the web server owner.
Cross-Origin Resource Sharing (CORS) - HTTP
WebHTTPCORS
if the resource owners at https://bar.other wished to restrict access to the resource to requests only from https://foo.example, they would send: access-control-allow-origin: https://foo.example now no domain other than https://foo.example can access the resource in a cross-site manner.
Referrer-Policy - HTTP
for <style> elements or style attributes, the owner document's referrer policy is used.
HTTP Index - HTTP
WebHTTPIndex
5 choosing between www and non-www urls guide, http, url a recurring question among website owners is whether to choose non-www or www urls.
JavaScript data types and data structures - JavaScript
see also enumerability and ownership of properties.
instanceof - JavaScript
for instance, you can securely check if a given object is, in fact, an array using array.isarray(myobj) for example, checking if a nodes is a svgelement in a different context, you can use mynode instanceof mynode.ownerdocument.defaultview.svgelement.
SVG 2 support in Mozilla - SVG: Scalable Vector Graphics
svgexternalresourcesrequired removed never implemented svgelement.viewportelement and svgelement.ownersvgelement nullable implementation status unknown svgelement.getpresentationattribute() removed never implemented (prototype removed in bug 921456) svgcolor and svgicccolor removed never implemented svgelement.focus(), svgelement.blur() not implemented (bug 778654) svgelement.tabindex implemented (bug 778654) document.activeelement imp...
Subdomain takeovers - Web security
unless the hosting provider is very careful to verify that the entity who sets up the virtual host actually is the owner of the subdomain name, an attacker who is quicker than you could create a virtual host with the same hosting provider, using your subdomain name.
Using the Mozilla JavaScript interface to XSL Transformations - XSLT: Extensible Stylesheet Language Transformations
var ownerdocument = document.implementation.createdocument("", "test", null); var newfragment = processor.transformtofragment(domtobetransformed, ownerdocument); xsltprocessor.transformtofragment() will only produce html dom objects if the owner document is itself an htmldocument, or if the output method of the stylesheet is html.