PageSourceSearch

https://www.googlecloudpresscorner.com/js/wd_resize.js

js googlecloudpresscorner.com collected 2026-10-01 10:13:04 UTC 1,147 bytes, 40 lines download raw bytes

1(function($) {
2	// Call specified resize method on elements from top down
3	webDriver.doResize = function(element, level) {
4		var $element = $(element);
5		level = level || "children";
6		var $items = $([]);
7		if (level == "container") {
8			$items = $element.parent().closest("[wd_resize]");
9			if ($items.length == 0)
10				level = "self";
11		}
12		if (level == "self") {
13			if ($element.attr("wd_resize"))
14				$items = $element;
15			else
16				level = "children";
17		}
18		if (level == "children") {
19			$items = $element.find("[wd_resize]");
20		}
21		$items.each(function() {
22			var $this = $(this);
23			var $parents = (level == "children") ? $this.parentsUntil($element, "[wd_resize]") : $([]);
24			if ($parents.length == 0) {
25				$this.addClass("wd_resizing");
26				var method = $this.attr("wd_resize");
27				var result = webDriver[method].call(this);
28				if (result !== false)
29					webDriver.doResize(this);
30				$this.removeClass("wd_resizing");
31			}
32		});
33	}
34	
35	$(function() {
36		// TODO: debounce resize events
37		$(window).resize(function() {webDriver.doResize(document);});
38		setTimeout(function() {webDriver.doResize(document);}, 1);
39	});
40})(webDriver.jQuery);

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.