Fix to 21512.

Added big note saying 'please disable security before trying to run
this' so nobody gets frustrated.

Updated sample component progid reference to actually match the .cpp.
Now the page actually works!  (John Morrison
<3jrgm@qlink.queensu.ca> caught this in mozilla.xpcom)

Thanks to Rick Bradley <roundeye@bellsouth.net> for pointing me to the
problem, and for encouraging me to add a note.

r=mccabe.  Not part of the build.


git-svn-id: svn://10.0.0.236/trunk@55912 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
mccabe%netscape.com
1999-12-12 05:41:29 +00:00
parent c060132cb3
commit 2db3a56287

View File

@@ -10,6 +10,14 @@ Last modified Aug 4, 1999
</center>
<hr>
NOTE: The example on this page currently won't work out of the box, because
access to arbitrary XPConnect components through <tt>Components</tt>
object is disabled for web-page JavaScript. When we get our security
story straightened out, we'll restore most access. For now, you can get around
it by finding '<tt>pref("security.checkxpconnect", <b>true</b>);'</tt> in the
preferences file (<tt>all.js</tt>) and setting it to <tt><b>false</b></tt>.
<hr>
<p>In the spirit of "worse is better" this somewhat rough guide is being
released to the world. It will be expanded upon and improved.
@@ -115,7 +123,7 @@ printed is calculated in C++ code defined in <a href="http://lxr.mozilla.org/sea
<!-- XXX keep in sync with stuff in pre tag below -->
<script>
/* to use nsSample.js version, use "mozilla.jssample.1" */
var sample = Components.classes["component://mozilla/sample/sample-world"].createInstance();
var sample = Components.classes["component://netscape/sample"].createInstance();
sample = sample.QueryInterface(Components.interfaces.nsISample);
dump("sample = " + sample + "\n");
@@ -161,7 +169,7 @@ JavaScript and form source:
<pre>
&lt;script&gt;
/* to use nsSample.js version, use "mozilla.jssample.1" */
var sample = Components.classes["component://mozilla/sample/sample-world"].createInstance();
var sample = Components.classes["component://netscape/sample"].createInstance();
sample = sample.QueryInterface(Components.interfaces.nsISample);
dump("sample = " + sample + "\n");