Browse Source

PlatformInterface docs: remove old API

Herbert Vojčík 9 years ago
parent
commit
6b358d8e99
2 changed files with 5 additions and 9 deletions
  1. 1 1
      src/Platform-Services.js
  2. 4 8
      src/Platform-Services.st

+ 1 - 1
src/Platform-Services.js

@@ -1508,7 +1508,7 @@ $globals.NullProgressHandler.klass);
 
 $core.addClass('PlatformInterface', $globals.Object, [], 'Platform-Services');
 //>>excludeStart("ide", pragmas.excludeIdeData);
-$globals.PlatformInterface.comment="I am single entry point to UI and environment interface.\x0aMy `initialize` tries several options (for now, browser environment only) to set myself up.\x0a\x0a## API\x0a\x0a    PlatformInterface alert: 'Hey, there is a problem'.\x0a    PlatformInterface confirm: 'Affirmative?'.\x0a    PlatformInterface prompt: 'Your name:'.\x0a\x0a    PlatformInterface ajax: #{\x0a        'url' -> '/patch.js'. 'type' -> 'GET'. dataType->'script'\x0a    }.";
+$globals.PlatformInterface.comment="I am single entry point to underlying platform.\x0a\x0a## API\x0a\x0a- `PlatformInterface newXhr` returns new instance of `XMLHttpRequest`. This should be polyfilled for platforms where it does not exists, so it is always present.\x0a\x0a- `PlatformInterface globals` returns JS global object.\x0a- `PlatformInterface existsGlobal: aString` tests is a global named `aString` exists.";
 //>>excludeEnd("ide");
 
 $core.addMethod(

+ 4 - 8
src/Platform-Services.st

@@ -346,18 +346,14 @@ Object subclass: #PlatformInterface
 	instanceVariableNames: ''
 	package: 'Platform-Services'!
 !PlatformInterface commentStamp!
-I am single entry point to UI and environment interface.
-My `initialize` tries several options (for now, browser environment only) to set myself up.
+I am single entry point to underlying platform.
 
 ## API
 
-    PlatformInterface alert: 'Hey, there is a problem'.
-    PlatformInterface confirm: 'Affirmative?'.
-    PlatformInterface prompt: 'Your name:'.
+- `PlatformInterface newXhr` returns new instance of `XMLHttpRequest`. This should be polyfilled for platforms where it does not exists, so it is always present.
 
-    PlatformInterface ajax: #{
-        'url' -> '/patch.js'. 'type' -> 'GET'. dataType->'script'
-    }.!
+- `PlatformInterface globals` returns JS global object.
+- `PlatformInterface existsGlobal: aString` tests is a global named `aString` exists.!
 
 !PlatformInterface class methodsFor: 'accessing'!