/**
 * Generated by Apache Royale Compiler from org\apache\royale\html\WebBrowser.as
 * org.apache.royale.html.WebBrowser
 *
 * @fileoverview
 *
 * @suppress {checkTypes|accessControls}
 */

goog.provide('org.apache.royale.html.WebBrowser');

goog.require('org.apache.royale.core.UIBase');
goog.require('org.apache.royale.core.WrappedHTMLElement');
goog.require('org.apache.royale.html.beads.models.WebBrowserModel');
goog.require('org.apache.royale.html.util.addElementToWrapper');
goog.require('org.apache.royale.utils.Language');



/**
 * Constructor
 *
 *  @langversion 3.0
 *  @playerversion Flash 10.2
 *  @playerversion AIR 2.6
 *  @productversion Royale 0.0
 * @constructor
 * @extends {org.apache.royale.core.UIBase}
 */
org.apache.royale.html.WebBrowser = function() {
  org.apache.royale.html.WebBrowser.base(this, 'constructor');
};
goog.inherits(org.apache.royale.html.WebBrowser, org.apache.royale.core.UIBase);


/**
 * Prevent renaming of class. Needed for reflection.
 */
goog.exportSymbol('org.apache.royale.html.WebBrowser', org.apache.royale.html.WebBrowser);


/**
 * @royaleignorecoercion org.apache.royale.core.WrappedHTMLElement
 * @royaleignorecoercion org.apache.royale.core.HTMLIFrameElement
 * @protected
 * @override
 */
org.apache.royale.html.WebBrowser.prototype.createElement = function() {
  var /** @type {HTMLIFrameElement} */ iframe = org.apache.royale.utils.Language.as(org.apache.royale.html.util.addElementToWrapper(this, 'iframe'), HTMLIFrameElement);
  iframe.frameBorder = "0";
  iframe.src = "JavaScript:''";
  iframe.sandbox = "allow-top-navigation allow-forms allow-scripts";
  return this.element;
};


org.apache.royale.html.WebBrowser.prototype.get__url = function() {
  return org.apache.royale.utils.Language.as(this.model, org.apache.royale.html.beads.models.WebBrowserModel).url;
};


org.apache.royale.html.WebBrowser.prototype.set__url = function(value) {
  org.apache.royale.utils.Language.as(this.model, org.apache.royale.html.beads.models.WebBrowserModel).url = value;
};


Object.defineProperties(org.apache.royale.html.WebBrowser.prototype, /** @lends {org.apache.royale.html.WebBrowser.prototype} */ {
/**
  * @export
  * @type {string} */
url: {
get: org.apache.royale.html.WebBrowser.prototype.get__url,
set: org.apache.royale.html.WebBrowser.prototype.set__url}}
);


/**
 * Metadata
 *
 * @type {Object.<string, Array.<Object>>}
 */
org.apache.royale.html.WebBrowser.prototype.ROYALE_CLASS_INFO = { names: [{ name: 'WebBrowser', qName: 'org.apache.royale.html.WebBrowser', kind: 'class' }] };



/**
 * Reflection
 *
 * @return {Object.<string, Function>}
 */
org.apache.royale.html.WebBrowser.prototype.ROYALE_REFLECTION_INFO = function () {
  return {
    variables: function () {return {};},
    accessors: function () {
      return {
        'url': { type: 'String', access: 'readwrite', declaredBy: 'org.apache.royale.html.WebBrowser'}
      };
    },
    methods: function () {
      return {
        'WebBrowser': { type: '', declaredBy: 'org.apache.royale.html.WebBrowser'}
      };
    }
  };
};