﻿function Paste(a){if(a)Widget.apply(this,arguments)}Paste.prototype=new Widget;Paste.prototype.constructor=Paste;Paste.prototype.widgetIdentifier="com-apple-iweb-widget-HTMLRegion";Paste.prototype.onload=function(){if(!this.runningInApp)this.setUpSubDocumentOnLoad()};Paste.prototype.setUpSubDocumentOnLoad=function(){var a=this,b=this.getElementById("frame");setTimeout(function(){a.loadedSubDocument()},250)};Paste.prototype.loadedSubDocument=function(){var b=this.getElementById("frame"),a=b.contentWindow||b.contentDocument;if(a.document)a=a.document;if(a.body){this.fixTargetOnElements(a,"a");this.fixTargetOnElements(a,"form")}else{var c=this;setTimeout(function(){c.loadedSubDocument()},250)}};Paste.prototype.fixTargetOnElements=function(e,d){var b=e.getElementsByTagName(d);for(var a=0;a<b.length;a++){var c=b[a].target;if(c===undefined||c=="")b[a].target="_top"}};Paste.prototype.changedPreferenceForKey=function(a){if(a=="x-html-markup"){this.div().innerHTML=this.div().innerHTML;this.preferences.postNotification("BLWidgetShouldStartAutoSizingNotification",1)}}
