1// 2// iWeb - Paste.js 3// Copyright (c) 2007-2008 Apple Inc. All rights reserved. 4// 5 6var Paste=Class.create(PrefMarkupWidget,{widgetIdentifier:"com-apple-iweb-widget-HTMLRegion",initialize:function($super,instanceID,widgetPath,sharedPath,sitePath,preferences,runningInApp) 7{if(instanceID) 8{$super(instanceID,widgetPath,sharedPath,sitePath,preferences,runningInApp);} 9if(runningInApp) 10{window.onresize=this.resize.bind(this);} 11var parentDiv=this.div('htmlRegion');this.m_views={};this.m_views["html-snippet"]=new HTMLRegionSnippetView(this,parentDiv);this.m_views["default-image-status"]=new HTMLRegionDefaultImageStatus(this,parentDiv);var iframe_src=eval(instanceID+'_htmlMarkupURL');this.m_iframe='<iframe id="'+instanceID+'-frame" '+'src="'+iframe_src+'" '+'frameborder="0" style="width: 100%; height: 100%;" '+'scrolling="no" marginheight="0" marginwidth="0" allowTransparency="true"></frame>';this.updateFromPreferences();},updateFromPreferences:function() 12{if(this.preferenceForKey('emptyLook')===true) 13{this.showView("default-image-status");} 14else 15{this.showView("html-snippet");}},changedPreferenceForKey:function(key) 16{if(key=="emptyLook") 17{if(this.preferenceForKey(key)===false) 18{if(this.m_currentView==this.m_views["html-snippet"]) 19{this.m_views["html-snippet"].render();} 20this.showView("html-snippet");this.preferences.postNotification("BLWidgetShouldStartAutoSizingNotification",1);} 21else 22{this.showView("default-image-status");}}},resize:function() 23{$H(this.m_views).each(function(pair){pair.value.resize();});}});var HTMLRegionSnippetView=Class.create(View,{m_divId:"html-snippet",m_divClass:"HTMLRegionSnippetView",render:function() 24{this.ensureDiv().update(this.m_widget.m_iframe);if(this.m_widget.runningInApp) 25{this.m_widget.preferences.postNotification("BLWidgetIsSafeToDrawNotification",0);}}});var HTMLRegionDefaultImageStatus=Class.create(StatusView,{m_divId:"default-image-status",m_divClass:"HTMLRegionStatusView",badgeImage:"HTMLRegionWorldMap.png",badgeImageWidth:198,badgeImageHeight:94});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.