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.
This commit is contained in:
mccabe%netscape.com 1999-12-12 05:41:29 +00:00
Родитель dd7cffa09f
Коммит 0666068a75
1 изменённых файлов: 10 добавлений и 2 удалений

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

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