From 2db3a5628711320795c5f7bbd1bf0e190e7172e5 Mon Sep 17 00:00:00 2001 From: "mccabe%netscape.com" Date: Sun, 12 Dec 1999 05:41:29 +0000 Subject: [PATCH] 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 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 --- mozilla/xpcom/sample/xpconnect-sample.html | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/mozilla/xpcom/sample/xpconnect-sample.html b/mozilla/xpcom/sample/xpconnect-sample.html index 46796c4658b..9309c725569 100644 --- a/mozilla/xpcom/sample/xpconnect-sample.html +++ b/mozilla/xpcom/sample/xpconnect-sample.html @@ -10,6 +10,14 @@ Last modified Aug 4, 1999
+NOTE: The example on this page currently won't work out of the box, because +access to arbitrary XPConnect components through Components +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 'pref("security.checkxpconnect", true);' in the +preferences file (all.js) and setting it to false. +
+

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