<doc>
	<legacy_id>3046</legacy_id>
	<name>revBrowserGet</name>
	<type>function</type>

	<syntax>
		<example>revBrowserGet(<i>instanceId</i>, <i>propertyName)</i></example>
		<example>XBrowser_Get(<i>propertyName </i>[, <i>instanceId </i>])</example>
	</syntax>
	
	<library>Browser Library</library>

	<synonyms>
		<synonym>XBrowser_Get</synonym>
	</synonyms>

	<summary>Retrieves a property from the specified browser object.</summary>

	<examples>
<example>put revBrowserGet(tBrowserId, &quot;rect&quot;) into tBrowserRect</example>
	</examples>

	<history>
		<introduced version="2.8.1">Added.</introduced>
		<deprecated version=""></deprecated>
		<removed version=""></removed>
		<changed version="4.6.2">userAgent property added on Mac</changed>
	</history>

	<objects>
	</objects>

	<platforms>
		<mac/>
		<windows/>
	</platforms>

	<classes>
		<desktop/>
	</classes>

	<security>
		<network/>
	</security>


	<classification>
	</classification>

	<references>
		<command tag="revBrowserSet">revBrowserSet Command</command>
	</references>

	<description>
	<overview>Use the <b>revBrowserGet</b> function to obtain information about the browser object specified by the <i>instanceId</i> by returning the value of one of the browser properties.</overview>

		<parameters>
  <parameter>
    <name>instanceId</name>
    <description>The integer identifier of a browser object.</description>
  </parameter>
  <parameter>
    <name>propertyName</name>
    <description>The name of the property to retrieve, see below for a full list.</description>
    <options title="">
      <option>
        <item>busy</item>
        <description>Returns true if the browser is in the middle of an operation, false otherwise.</description>
      </option>
      <option>
        <item>rect</item>
        <description>Returns the rect of the browser relative to the parent window. The default rect is 0,0,0,0.</description>
      </option>
      <option>
        <item>url</item>
        <description>The url that the browser is currently displaying. The default url is empty.</description>
      </option>
      <option>
        <item>htmltext</item>
        <description>The html source of the current page being displayed. The default htmltext is empty.</description>
      </option>
      <option>
        <item>messages</item>
        <description>Whether the browser should send "advanced" callback messages. Please see the note below for more details. The default is false.</description>
      </option>
      <option>
        <item>offline</item>
        <description>Returns true if the browser is in offline mode, ie set not to retrieve information from the internet, otherwise false. The default is false.</description>
      </option>
      <option>
        <item>contextmenu</item>
        <description>Returns true if the browser will display a right-click context menu, false otherwise. The default is false.</description>
      </option>
      <option>
        <item>visible</item>
        <description>Returns true if the browser is visible, false otherwise. The default is true.</description>
      </option>
      <option>
        <item>scrollbars</item>
        <description>Returns true if the browser has scrollbars showing, false otherwise. The default is true.</description>
      </option>
      <option>
        <item>title</item>
        <description>The title of current page being displayed in the browser. On Mac OS X, this is a UTF-8 string and can be decoded using the uniDecode function. On Windows systems the title is plain text.</description>
      </option>
      <option>
        <item>newwindow</item>
        <description>Returns if the browser will allow new windows to be opened by web pages. The default is false.</description>
      </option>
      <option>
        <item>selected</item>
        <description>The currently selected text. The default is empty.</description>
      </option>
      <option>
        <item>formattedwidth</item>
        <description>The width of current document in pixels. This will be greater than or equal to the width of the browser object.</description>
      </option>
      <option>
        <item>formattedHeight</item>
        <description>The height of the current document in pixels.</description>
      </option>
      <option>
        <item>formattedRect</item>
        <description>The rectangle of the current document as if it were not clipped to the boundaries of the browser object. This value will change when the document is scrolled, as it is effectively moving. All values are in pixels. For more information about rectangles see the rectangle property.</description>
      </option>
      <option>
        <item>vscroll</item>
        <description>The number of pixels down that the browser is scrolled. This is zero by default.</description>
      </option>
      <option>
        <item>hscroll</item>
        <description>The number of pixels to the right that the browser is scrolled. This is zero by default.</description>
      </option>
      <option>
        <item>instances</item>
        <description>The list of created browser instances, one per line. If propertyName is set to "instances" then the instanceId is ignored. This property is deprecated and is only available when using the XBrowser_Get synonym. To get a list of the browser instances you should use the revBrowserInstances function.</description>
      </option>
      <option>
        <item>instance</item>
        <description>The instance id of the active browser instance. If propertyName is set to "instance" then the instanceId is ignored. This property is deprecated and is only available when using the XBrowser_Get synonym. The instance id of a browser object is returned by the revBrowserOpen function used to to create the object.</description>
      </option>
      <option>
        <item>version</item>
        <description>The version of the browser external. If propertyName is set to "version" then the instanceId is ignored. This property is deprecated and is only available when using the XBrowser_Get synonym. The browser external is now part of LiveCode and its version is the same as LiveCode's version.</description>
      </option>
      <option>
        <item>htmlimage</item>
        <description>The image data of what is being displayed in the browser. This property is deprecated and is only available when using the XBrowser_Get synonym. To get a snapshot from the browser use the revBrowserSnapshot command.</description>
      </option>
      <option>
        <item>useragent</item>
        <description>MAC ONLY. The custom user agent string used in the User-Agent header transmitted to the web server. If a custom user agent string has not been set empty is returned.</description>
      </option>
    </options>
  </parameter>		</parameters>

	<value>The <b>revBrowserGet</b> command returns the value of the specified property if it was successful.</value>
	<comments><note>The &quot;advanced&quot; callback messages are: <message tag="browserClick">revBrowserClick</message>, <message tag="browserOver">revBrowserOver</message> and <message tag="browserOut">revBrowserOut</message>. These messages are only sent when the &quot;messages&quot; property is set to true. Other callback messages are always sent.<p></note><p></p><note>For general information on using the browser library, see the notes in the <function tag="revBrowserOpen">revBrowserOpen function</function> reference.</note></comments>
	</description>
</doc>