12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233 |
- goog.provide('goog.dom');
- goog.provide('goog.dom.Appendable');
- goog.provide('goog.dom.DomHelper');
- goog.require('goog.array');
- goog.require('goog.asserts');
- goog.require('goog.dom.BrowserFeature');
- goog.require('goog.dom.NodeType');
- goog.require('goog.dom.TagName');
- goog.require('goog.dom.safe');
- goog.require('goog.html.SafeHtml');
- goog.require('goog.html.uncheckedconversions');
- goog.require('goog.math.Coordinate');
- goog.require('goog.math.Size');
- goog.require('goog.object');
- goog.require('goog.string');
- goog.require('goog.string.Unicode');
- goog.require('goog.userAgent');
- goog.define('goog.dom.ASSUME_QUIRKS_MODE', false);
- goog.define('goog.dom.ASSUME_STANDARDS_MODE', false);
- goog.dom.COMPAT_MODE_KNOWN_ =
- goog.dom.ASSUME_QUIRKS_MODE || goog.dom.ASSUME_STANDARDS_MODE;
- goog.dom.getDomHelper = function(opt_element) {
- return opt_element ?
- new goog.dom.DomHelper(goog.dom.getOwnerDocument(opt_element)) :
- (goog.dom.defaultDomHelper_ ||
- (goog.dom.defaultDomHelper_ = new goog.dom.DomHelper()));
- };
- goog.dom.defaultDomHelper_;
- goog.dom.getDocument = function() {
- return document;
- };
- goog.dom.getElement = function(element) {
- return goog.dom.getElementHelper_(document, element);
- };
- goog.dom.getElementHelper_ = function(doc, element) {
- return goog.isString(element) ? doc.getElementById(element) : element;
- };
- goog.dom.getRequiredElement = function(id) {
- return goog.dom.getRequiredElementHelper_(document, id);
- };
- goog.dom.getRequiredElementHelper_ = function(doc, id) {
-
- goog.asserts.assertString(id);
- var element = goog.dom.getElementHelper_(doc, id);
- element =
- goog.asserts.assertElement(element, 'No element found with id: ' + id);
- return element;
- };
- goog.dom.$ = goog.dom.getElement;
- goog.dom.getElementsByTagName = function(tagName, opt_parent) {
- var parent = opt_parent || document;
- return parent.getElementsByTagName(String(tagName));
- };
- goog.dom.getElementsByTagNameAndClass = function(opt_tag, opt_class, opt_el) {
- return goog.dom.getElementsByTagNameAndClass_(
- document, opt_tag, opt_class, opt_el);
- };
- goog.dom.getElementByTagNameAndClass = function(opt_tag, opt_class, opt_el) {
- return goog.dom.getElementByTagNameAndClass_(
- document, opt_tag, opt_class, opt_el);
- };
- goog.dom.getElementsByClass = function(className, opt_el) {
- var parent = opt_el || document;
- if (goog.dom.canUseQuerySelector_(parent)) {
- return parent.querySelectorAll('.' + className);
- }
- return goog.dom.getElementsByTagNameAndClass_(
- document, '*', className, opt_el);
- };
- goog.dom.getElementByClass = function(className, opt_el) {
- var parent = opt_el || document;
- var retVal = null;
- if (parent.getElementsByClassName) {
- retVal = parent.getElementsByClassName(className)[0];
- } else {
- retVal =
- goog.dom.getElementByTagNameAndClass_(document, '*', className, opt_el);
- }
- return retVal || null;
- };
- goog.dom.getRequiredElementByClass = function(className, opt_root) {
- var retValue = goog.dom.getElementByClass(className, opt_root);
- return goog.asserts.assert(
- retValue, 'No element found with className: ' + className);
- };
- goog.dom.canUseQuerySelector_ = function(parent) {
- return !!(parent.querySelectorAll && parent.querySelector);
- };
- goog.dom.getElementsByTagNameAndClass_ = function(
- doc, opt_tag, opt_class, opt_el) {
- var parent = opt_el || doc;
- var tagName =
- (opt_tag && opt_tag != '*') ? String(opt_tag).toUpperCase() : '';
- if (goog.dom.canUseQuerySelector_(parent) && (tagName || opt_class)) {
- var query = tagName + (opt_class ? '.' + opt_class : '');
- return parent.querySelectorAll(query);
- }
-
-
-
- if (opt_class && parent.getElementsByClassName) {
- var els = parent.getElementsByClassName(opt_class);
- if (tagName) {
- var arrayLike = {};
- var len = 0;
-
- for (var i = 0, el; el = els[i]; i++) {
- if (tagName == el.nodeName) {
- arrayLike[len++] = el;
- }
- }
- arrayLike.length = len;
- return (arrayLike);
- } else {
- return els;
- }
- }
- var els = parent.getElementsByTagName(tagName || '*');
- if (opt_class) {
- var arrayLike = {};
- var len = 0;
- for (var i = 0, el; el = els[i]; i++) {
- var className = el.className;
-
- if (typeof className.split == 'function' &&
- goog.array.contains(className.split(/\s+/), opt_class)) {
- arrayLike[len++] = el;
- }
- }
- arrayLike.length = len;
- return (arrayLike);
- } else {
- return els;
- }
- };
- goog.dom.getElementByTagNameAndClass_ = function(
- doc, opt_tag, opt_class, opt_el) {
- var parent = opt_el || doc;
- var tag = (opt_tag && opt_tag != '*') ? String(opt_tag).toUpperCase() : '';
- if (goog.dom.canUseQuerySelector_(parent) && (tag || opt_class)) {
- return parent.querySelector(tag + (opt_class ? '.' + opt_class : ''));
- }
- var elements =
- goog.dom.getElementsByTagNameAndClass_(doc, opt_tag, opt_class, opt_el);
- return elements[0] || null;
- };
- goog.dom.$$ = goog.dom.getElementsByTagNameAndClass;
- goog.dom.setProperties = function(element, properties) {
- goog.object.forEach(properties, function(val, key) {
- if (val && val.implementsGoogStringTypedString) {
- val = val.getTypedStringValue();
- }
- if (key == 'style') {
- element.style.cssText = val;
- } else if (key == 'class') {
- element.className = val;
- } else if (key == 'for') {
- element.htmlFor = val;
- } else if (goog.dom.DIRECT_ATTRIBUTE_MAP_.hasOwnProperty(key)) {
- element.setAttribute(goog.dom.DIRECT_ATTRIBUTE_MAP_[key], val);
- } else if (
- goog.string.startsWith(key, 'aria-') ||
- goog.string.startsWith(key, 'data-')) {
- element.setAttribute(key, val);
- } else {
- element[key] = val;
- }
- });
- };
- goog.dom.DIRECT_ATTRIBUTE_MAP_ = {
- 'cellpadding': 'cellPadding',
- 'cellspacing': 'cellSpacing',
- 'colspan': 'colSpan',
- 'frameborder': 'frameBorder',
- 'height': 'height',
- 'maxlength': 'maxLength',
- 'nonce': 'nonce',
- 'role': 'role',
- 'rowspan': 'rowSpan',
- 'type': 'type',
- 'usemap': 'useMap',
- 'valign': 'vAlign',
- 'width': 'width'
- };
- goog.dom.getViewportSize = function(opt_window) {
-
- return goog.dom.getViewportSize_(opt_window || window);
- };
- goog.dom.getViewportSize_ = function(win) {
- var doc = win.document;
- var el = goog.dom.isCss1CompatMode_(doc) ? doc.documentElement : doc.body;
- return new goog.math.Size(el.clientWidth, el.clientHeight);
- };
- goog.dom.getDocumentHeight = function() {
- return goog.dom.getDocumentHeight_(window);
- };
- goog.dom.getDocumentHeightForWindow = function(win) {
- return goog.dom.getDocumentHeight_(win);
- };
- goog.dom.getDocumentHeight_ = function(win) {
-
-
- var doc = win.document;
- var height = 0;
- if (doc) {
-
-
-
-
-
-
-
-
-
- var body = doc.body;
- var docEl = (doc.documentElement);
- if (!(docEl && body)) {
- return 0;
- }
-
- var vh = goog.dom.getViewportSize_(win).height;
- if (goog.dom.isCss1CompatMode_(doc) && docEl.scrollHeight) {
-
-
-
-
-
-
- height =
- docEl.scrollHeight != vh ? docEl.scrollHeight : docEl.offsetHeight;
- } else {
-
-
-
-
-
-
-
-
- var sh = docEl.scrollHeight;
- var oh = docEl.offsetHeight;
- if (docEl.clientHeight != oh) {
- sh = body.scrollHeight;
- oh = body.offsetHeight;
- }
-
-
-
- if (sh > vh) {
-
- height = sh > oh ? sh : oh;
- } else {
-
- height = sh < oh ? sh : oh;
- }
- }
- }
- return height;
- };
- goog.dom.getPageScroll = function(opt_window) {
- var win = opt_window || goog.global || window;
- return goog.dom.getDomHelper(win.document).getDocumentScroll();
- };
- goog.dom.getDocumentScroll = function() {
- return goog.dom.getDocumentScroll_(document);
- };
- goog.dom.getDocumentScroll_ = function(doc) {
- var el = goog.dom.getDocumentScrollElement_(doc);
- var win = goog.dom.getWindow_(doc);
- if (goog.userAgent.IE && goog.userAgent.isVersionOrHigher('10') &&
- win.pageYOffset != el.scrollTop) {
-
-
-
- return new goog.math.Coordinate(el.scrollLeft, el.scrollTop);
- }
- return new goog.math.Coordinate(
- win.pageXOffset || el.scrollLeft, win.pageYOffset || el.scrollTop);
- };
- goog.dom.getDocumentScrollElement = function() {
- return goog.dom.getDocumentScrollElement_(document);
- };
- goog.dom.getDocumentScrollElement_ = function(doc) {
-
-
-
-
-
- if (doc.scrollingElement) {
- return doc.scrollingElement;
- }
- if (!goog.userAgent.WEBKIT && goog.dom.isCss1CompatMode_(doc)) {
- return doc.documentElement;
- }
- return doc.body || doc.documentElement;
- };
- goog.dom.getWindow = function(opt_doc) {
-
- return opt_doc ? goog.dom.getWindow_(opt_doc) : window;
- };
- goog.dom.getWindow_ = function(doc) {
- return (doc.parentWindow || doc.defaultView);
- };
- goog.dom.createDom = function(tagName, opt_attributes, var_args) {
- return goog.dom.createDom_(document, arguments);
- };
- goog.dom.createDom_ = function(doc, args) {
- var tagName = String(args[0]);
- var attributes = args[1];
-
-
-
-
- if (!goog.dom.BrowserFeature.CAN_ADD_NAME_OR_TYPE_ATTRIBUTES && attributes &&
- (attributes.name || attributes.type)) {
- var tagNameArr = ['<', tagName];
- if (attributes.name) {
- tagNameArr.push(' name="', goog.string.htmlEscape(attributes.name), '"');
- }
- if (attributes.type) {
- tagNameArr.push(' type="', goog.string.htmlEscape(attributes.type), '"');
-
- var clone = {};
- goog.object.extend(clone, attributes);
-
-
-
- delete clone['type'];
- attributes = clone;
- }
- tagNameArr.push('>');
- tagName = tagNameArr.join('');
- }
- var element = doc.createElement(tagName);
- if (attributes) {
- if (goog.isString(attributes)) {
- element.className = attributes;
- } else if (goog.isArray(attributes)) {
- element.className = attributes.join(' ');
- } else {
- goog.dom.setProperties(element, attributes);
- }
- }
- if (args.length > 2) {
- goog.dom.append_(doc, element, args, 2);
- }
- return element;
- };
- goog.dom.append_ = function(doc, parent, args, startIndex) {
- function childHandler(child) {
-
- if (child) {
- parent.appendChild(
- goog.isString(child) ? doc.createTextNode(child) : child);
- }
- }
- for (var i = startIndex; i < args.length; i++) {
- var arg = args[i];
-
- if (goog.isArrayLike(arg) && !goog.dom.isNodeLike(arg)) {
-
-
- goog.array.forEach(
- goog.dom.isNodeList(arg) ? goog.array.toArray(arg) : arg,
- childHandler);
- } else {
- childHandler(arg);
- }
- }
- };
- goog.dom.$dom = goog.dom.createDom;
- goog.dom.createElement = function(name) {
- return goog.dom.createElement_(document, name);
- };
- goog.dom.createElement_ = function(doc, name) {
- return doc.createElement(String(name));
- };
- goog.dom.createTextNode = function(content) {
- return document.createTextNode(String(content));
- };
- goog.dom.createTable = function(rows, columns, opt_fillWithNbsp) {
-
-
- return goog.dom.createTable_(document, rows, columns, !!opt_fillWithNbsp);
- };
- goog.dom.createTable_ = function(doc, rows, columns, fillWithNbsp) {
- var table = goog.dom.createElement_(doc, goog.dom.TagName.TABLE);
- var tbody =
- table.appendChild(goog.dom.createElement_(doc, goog.dom.TagName.TBODY));
- for (var i = 0; i < rows; i++) {
- var tr = goog.dom.createElement_(doc, goog.dom.TagName.TR);
- for (var j = 0; j < columns; j++) {
- var td = goog.dom.createElement_(doc, goog.dom.TagName.TD);
-
-
-
- if (fillWithNbsp) {
- goog.dom.setTextContent(td, goog.string.Unicode.NBSP);
- }
- tr.appendChild(td);
- }
- tbody.appendChild(tr);
- }
- return table;
- };
- goog.dom.constHtmlToNode = function(var_args) {
- var stringArray = goog.array.map(arguments, goog.string.Const.unwrap);
- var safeHtml =
- goog.html.uncheckedconversions
- .safeHtmlFromStringKnownToSatisfyTypeContract(
- goog.string.Const.from(
- 'Constant HTML string, that gets turned into a ' +
- 'Node later, so it will be automatically balanced.'),
- stringArray.join(''));
- return goog.dom.safeHtmlToNode(safeHtml);
- };
- goog.dom.safeHtmlToNode = function(html) {
- return goog.dom.safeHtmlToNode_(document, html);
- };
- goog.dom.safeHtmlToNode_ = function(doc, html) {
- var tempDiv = goog.dom.createElement_(doc, goog.dom.TagName.DIV);
- if (goog.dom.BrowserFeature.INNER_HTML_NEEDS_SCOPED_ELEMENT) {
- goog.dom.safe.setInnerHtml(
- tempDiv, goog.html.SafeHtml.concat(goog.html.SafeHtml.BR, html));
- tempDiv.removeChild(tempDiv.firstChild);
- } else {
- goog.dom.safe.setInnerHtml(tempDiv, html);
- }
- return goog.dom.childrenToNode_(doc, tempDiv);
- };
- goog.dom.childrenToNode_ = function(doc, tempDiv) {
- if (tempDiv.childNodes.length == 1) {
- return tempDiv.removeChild(tempDiv.firstChild);
- } else {
- var fragment = doc.createDocumentFragment();
- while (tempDiv.firstChild) {
- fragment.appendChild(tempDiv.firstChild);
- }
- return fragment;
- }
- };
- goog.dom.isCss1CompatMode = function() {
- return goog.dom.isCss1CompatMode_(document);
- };
- goog.dom.isCss1CompatMode_ = function(doc) {
- if (goog.dom.COMPAT_MODE_KNOWN_) {
- return goog.dom.ASSUME_STANDARDS_MODE;
- }
- return doc.compatMode == 'CSS1Compat';
- };
- goog.dom.canHaveChildren = function(node) {
- if (node.nodeType != goog.dom.NodeType.ELEMENT) {
- return false;
- }
- switch ( (node).tagName) {
- case String(goog.dom.TagName.APPLET):
- case String(goog.dom.TagName.AREA):
- case String(goog.dom.TagName.BASE):
- case String(goog.dom.TagName.BR):
- case String(goog.dom.TagName.COL):
- case String(goog.dom.TagName.COMMAND):
- case String(goog.dom.TagName.EMBED):
- case String(goog.dom.TagName.FRAME):
- case String(goog.dom.TagName.HR):
- case String(goog.dom.TagName.IMG):
- case String(goog.dom.TagName.INPUT):
- case String(goog.dom.TagName.IFRAME):
- case String(goog.dom.TagName.ISINDEX):
- case String(goog.dom.TagName.KEYGEN):
- case String(goog.dom.TagName.LINK):
- case String(goog.dom.TagName.NOFRAMES):
- case String(goog.dom.TagName.NOSCRIPT):
- case String(goog.dom.TagName.META):
- case String(goog.dom.TagName.OBJECT):
- case String(goog.dom.TagName.PARAM):
- case String(goog.dom.TagName.SCRIPT):
- case String(goog.dom.TagName.SOURCE):
- case String(goog.dom.TagName.STYLE):
- case String(goog.dom.TagName.TRACK):
- case String(goog.dom.TagName.WBR):
- return false;
- }
- return true;
- };
- goog.dom.appendChild = function(parent, child) {
- parent.appendChild(child);
- };
- goog.dom.append = function(parent, var_args) {
- goog.dom.append_(goog.dom.getOwnerDocument(parent), parent, arguments, 1);
- };
- goog.dom.removeChildren = function(node) {
-
-
-
- var child;
- while ((child = node.firstChild)) {
- node.removeChild(child);
- }
- };
- goog.dom.insertSiblingBefore = function(newNode, refNode) {
- if (refNode.parentNode) {
- refNode.parentNode.insertBefore(newNode, refNode);
- }
- };
- goog.dom.insertSiblingAfter = function(newNode, refNode) {
- if (refNode.parentNode) {
- refNode.parentNode.insertBefore(newNode, refNode.nextSibling);
- }
- };
- goog.dom.insertChildAt = function(parent, child, index) {
-
-
- parent.insertBefore(child, parent.childNodes[index] || null);
- };
- goog.dom.removeNode = function(node) {
- return node && node.parentNode ? node.parentNode.removeChild(node) : null;
- };
- goog.dom.replaceNode = function(newNode, oldNode) {
- var parent = oldNode.parentNode;
- if (parent) {
- parent.replaceChild(newNode, oldNode);
- }
- };
- goog.dom.flattenElement = function(element) {
- var child, parent = element.parentNode;
- if (parent && parent.nodeType != goog.dom.NodeType.DOCUMENT_FRAGMENT) {
-
- if (element.removeNode) {
- return (element.removeNode(false));
- } else {
-
- while ((child = element.firstChild)) {
- parent.insertBefore(child, element);
- }
-
- return (goog.dom.removeNode(element));
- }
- }
- };
- goog.dom.getChildren = function(element) {
-
-
- if (goog.dom.BrowserFeature.CAN_USE_CHILDREN_ATTRIBUTE &&
- element.children != undefined) {
- return element.children;
- }
-
- return goog.array.filter(element.childNodes, function(node) {
- return node.nodeType == goog.dom.NodeType.ELEMENT;
- });
- };
- goog.dom.getFirstElementChild = function(node) {
- if (goog.isDef(node.firstElementChild)) {
- return (node).firstElementChild;
- }
- return goog.dom.getNextElementNode_(node.firstChild, true);
- };
- goog.dom.getLastElementChild = function(node) {
- if (goog.isDef(node.lastElementChild)) {
- return (node).lastElementChild;
- }
- return goog.dom.getNextElementNode_(node.lastChild, false);
- };
- goog.dom.getNextElementSibling = function(node) {
- if (goog.isDef(node.nextElementSibling)) {
- return (node).nextElementSibling;
- }
- return goog.dom.getNextElementNode_(node.nextSibling, true);
- };
- goog.dom.getPreviousElementSibling = function(node) {
- if (goog.isDef(node.previousElementSibling)) {
- return (node).previousElementSibling;
- }
- return goog.dom.getNextElementNode_(node.previousSibling, false);
- };
- goog.dom.getNextElementNode_ = function(node, forward) {
- while (node && node.nodeType != goog.dom.NodeType.ELEMENT) {
- node = forward ? node.nextSibling : node.previousSibling;
- }
- return (node);
- };
- goog.dom.getNextNode = function(node) {
- if (!node) {
- return null;
- }
- if (node.firstChild) {
- return node.firstChild;
- }
- while (node && !node.nextSibling) {
- node = node.parentNode;
- }
- return node ? node.nextSibling : null;
- };
- goog.dom.getPreviousNode = function(node) {
- if (!node) {
- return null;
- }
- if (!node.previousSibling) {
- return node.parentNode;
- }
- node = node.previousSibling;
- while (node && node.lastChild) {
- node = node.lastChild;
- }
- return node;
- };
- goog.dom.isNodeLike = function(obj) {
- return goog.isObject(obj) && obj.nodeType > 0;
- };
- goog.dom.isElement = function(obj) {
- return goog.isObject(obj) && obj.nodeType == goog.dom.NodeType.ELEMENT;
- };
- goog.dom.isWindow = function(obj) {
- return goog.isObject(obj) && obj['window'] == obj;
- };
- goog.dom.getParentElement = function(element) {
- var parent;
- if (goog.dom.BrowserFeature.CAN_USE_PARENT_ELEMENT_PROPERTY) {
- var isIe9 = goog.userAgent.IE && goog.userAgent.isVersionOrHigher('9') &&
- !goog.userAgent.isVersionOrHigher('10');
-
-
- if (!(isIe9 && goog.global['SVGElement'] &&
- element instanceof goog.global['SVGElement'])) {
- parent = element.parentElement;
- if (parent) {
- return parent;
- }
- }
- }
- parent = element.parentNode;
- return goog.dom.isElement(parent) ? (parent) : null;
- };
- goog.dom.contains = function(parent, descendant) {
- if (!parent || !descendant) {
- return false;
- }
-
-
-
- if (parent.contains && descendant.nodeType == goog.dom.NodeType.ELEMENT) {
- return parent == descendant || parent.contains(descendant);
- }
-
- if (typeof parent.compareDocumentPosition != 'undefined') {
- return parent == descendant ||
- Boolean(parent.compareDocumentPosition(descendant) & 16);
- }
-
- while (descendant && parent != descendant) {
- descendant = descendant.parentNode;
- }
- return descendant == parent;
- };
- goog.dom.compareNodeOrder = function(node1, node2) {
-
- if (node1 == node2) {
- return 0;
- }
-
- if (node1.compareDocumentPosition) {
-
- return node1.compareDocumentPosition(node2) & 2 ? 1 : -1;
- }
-
- if (goog.userAgent.IE && !goog.userAgent.isDocumentModeOrHigher(9)) {
- if (node1.nodeType == goog.dom.NodeType.DOCUMENT) {
- return -1;
- }
- if (node2.nodeType == goog.dom.NodeType.DOCUMENT) {
- return 1;
- }
- }
-
-
- if ('sourceIndex' in node1 ||
- (node1.parentNode && 'sourceIndex' in node1.parentNode)) {
- var isElement1 = node1.nodeType == goog.dom.NodeType.ELEMENT;
- var isElement2 = node2.nodeType == goog.dom.NodeType.ELEMENT;
- if (isElement1 && isElement2) {
- return node1.sourceIndex - node2.sourceIndex;
- } else {
- var parent1 = node1.parentNode;
- var parent2 = node2.parentNode;
- if (parent1 == parent2) {
- return goog.dom.compareSiblingOrder_(node1, node2);
- }
- if (!isElement1 && goog.dom.contains(parent1, node2)) {
- return -1 * goog.dom.compareParentsDescendantNodeIe_(node1, node2);
- }
- if (!isElement2 && goog.dom.contains(parent2, node1)) {
- return goog.dom.compareParentsDescendantNodeIe_(node2, node1);
- }
- return (isElement1 ? node1.sourceIndex : parent1.sourceIndex) -
- (isElement2 ? node2.sourceIndex : parent2.sourceIndex);
- }
- }
-
- var doc = goog.dom.getOwnerDocument(node1);
- var range1, range2;
- range1 = doc.createRange();
- range1.selectNode(node1);
- range1.collapse(true);
- range2 = doc.createRange();
- range2.selectNode(node2);
- range2.collapse(true);
- return range1.compareBoundaryPoints(
- goog.global['Range'].START_TO_END, range2);
- };
- goog.dom.compareParentsDescendantNodeIe_ = function(textNode, node) {
- var parent = textNode.parentNode;
- if (parent == node) {
-
- return -1;
- }
- var sibling = node;
- while (sibling.parentNode != parent) {
- sibling = sibling.parentNode;
- }
- return goog.dom.compareSiblingOrder_(sibling, textNode);
- };
- goog.dom.compareSiblingOrder_ = function(node1, node2) {
- var s = node2;
- while ((s = s.previousSibling)) {
- if (s == node1) {
-
- return -1;
- }
- }
-
- return 1;
- };
- goog.dom.findCommonAncestor = function(var_args) {
- var i, count = arguments.length;
- if (!count) {
- return null;
- } else if (count == 1) {
- return arguments[0];
- }
- var paths = [];
- var minLength = Infinity;
- for (i = 0; i < count; i++) {
-
- var ancestors = [];
- var node = arguments[i];
- while (node) {
- ancestors.unshift(node);
- node = node.parentNode;
- }
-
- paths.push(ancestors);
- minLength = Math.min(minLength, ancestors.length);
- }
- var output = null;
- for (i = 0; i < minLength; i++) {
- var first = paths[0][i];
- for (var j = 1; j < count; j++) {
- if (first != paths[j][i]) {
- return output;
- }
- }
- output = first;
- }
- return output;
- };
- goog.dom.getOwnerDocument = function(node) {
-
- goog.asserts.assert(node, 'Node cannot be null or undefined.');
- return (
- node.nodeType == goog.dom.NodeType.DOCUMENT ? node : node.ownerDocument ||
- node.document);
- };
- goog.dom.getFrameContentDocument = function(frame) {
- return frame.contentDocument ||
- (frame).contentWindow.document;
- };
- goog.dom.getFrameContentWindow = function(frame) {
- try {
- return frame.contentWindow ||
- (frame.contentDocument ? goog.dom.getWindow(frame.contentDocument) :
- null);
- } catch (e) {
-
-
-
-
- }
- return null;
- };
- goog.dom.setTextContent = function(node, text) {
- goog.asserts.assert(
- node != null,
- 'goog.dom.setTextContent expects a non-null value for node');
- if ('textContent' in node) {
- node.textContent = text;
- } else if (node.nodeType == goog.dom.NodeType.TEXT) {
- (node).data = String(text);
- } else if (
- node.firstChild && node.firstChild.nodeType == goog.dom.NodeType.TEXT) {
-
-
- while (node.lastChild != node.firstChild) {
- node.removeChild(node.lastChild);
- }
- (node.firstChild).data = String(text);
- } else {
- goog.dom.removeChildren(node);
- var doc = goog.dom.getOwnerDocument(node);
- node.appendChild(doc.createTextNode(String(text)));
- }
- };
- goog.dom.getOuterHtml = function(element) {
- goog.asserts.assert(
- element !== null,
- 'goog.dom.getOuterHtml expects a non-null value for element');
-
- if ('outerHTML' in element) {
- return element.outerHTML;
- } else {
- var doc = goog.dom.getOwnerDocument(element);
- var div = goog.dom.createElement_(doc, goog.dom.TagName.DIV);
- div.appendChild(element.cloneNode(true));
- return div.innerHTML;
- }
- };
- goog.dom.findNode = function(root, p) {
- var rv = [];
- var found = goog.dom.findNodes_(root, p, rv, true);
- return found ? rv[0] : undefined;
- };
- goog.dom.findNodes = function(root, p) {
- var rv = [];
- goog.dom.findNodes_(root, p, rv, false);
- return rv;
- };
- goog.dom.findNodes_ = function(root, p, rv, findOne) {
- if (root != null) {
- var child = root.firstChild;
- while (child) {
- if (p(child)) {
- rv.push(child);
- if (findOne) {
- return true;
- }
- }
- if (goog.dom.findNodes_(child, p, rv, findOne)) {
- return true;
- }
- child = child.nextSibling;
- }
- }
- return false;
- };
- goog.dom.TAGS_TO_IGNORE_ = {
- 'SCRIPT': 1,
- 'STYLE': 1,
- 'HEAD': 1,
- 'IFRAME': 1,
- 'OBJECT': 1
- };
- goog.dom.PREDEFINED_TAG_VALUES_ = {
- 'IMG': ' ',
- 'BR': '\n'
- };
- goog.dom.isFocusableTabIndex = function(element) {
- return goog.dom.hasSpecifiedTabIndex_(element) &&
- goog.dom.isTabIndexFocusable_(element);
- };
- goog.dom.setFocusableTabIndex = function(element, enable) {
- if (enable) {
- element.tabIndex = 0;
- } else {
-
-
-
-
- element.tabIndex = -1;
- element.removeAttribute('tabIndex');
- }
- };
- goog.dom.isFocusable = function(element) {
- var focusable;
-
- if (goog.dom.nativelySupportsFocus_(element)) {
-
- focusable = !element.disabled &&
-
- (!goog.dom.hasSpecifiedTabIndex_(element) ||
- goog.dom.isTabIndexFocusable_(element));
- } else {
- focusable = goog.dom.isFocusableTabIndex(element);
- }
-
- return focusable && goog.userAgent.IE ?
- goog.dom.hasNonZeroBoundingRect_( (element)) :
- focusable;
- };
- goog.dom.hasSpecifiedTabIndex_ = function(element) {
-
-
- if (goog.userAgent.IE && !goog.userAgent.isVersionOrHigher('9')) {
- var attrNode = element.getAttributeNode('tabindex');
- return goog.isDefAndNotNull(attrNode) && attrNode.specified;
- } else {
- return element.hasAttribute('tabindex');
- }
- };
- goog.dom.isTabIndexFocusable_ = function(element) {
- var index = (element).tabIndex;
-
- return goog.isNumber(index) && index >= 0 && index < 32768;
- };
- goog.dom.nativelySupportsFocus_ = function(element) {
- return element.tagName == goog.dom.TagName.A ||
- element.tagName == goog.dom.TagName.INPUT ||
- element.tagName == goog.dom.TagName.TEXTAREA ||
- element.tagName == goog.dom.TagName.SELECT ||
- element.tagName == goog.dom.TagName.BUTTON;
- };
- goog.dom.hasNonZeroBoundingRect_ = function(element) {
- var rect;
- if (!goog.isFunction(element['getBoundingClientRect']) ||
-
- (goog.userAgent.IE && element.parentElement == null)) {
- rect = {'height': element.offsetHeight, 'width': element.offsetWidth};
- } else {
- rect = element.getBoundingClientRect();
- }
- return goog.isDefAndNotNull(rect) && rect.height > 0 && rect.width > 0;
- };
- goog.dom.getTextContent = function(node) {
- var textContent;
-
-
- if (goog.dom.BrowserFeature.CAN_USE_INNER_TEXT && node !== null &&
- ('innerText' in node)) {
- textContent = goog.string.canonicalizeNewlines(node.innerText);
-
-
- } else {
- var buf = [];
- goog.dom.getTextContent_(node, buf, true);
- textContent = buf.join('');
- }
-
- textContent = textContent.replace(/ \xAD /g, ' ').replace(/\xAD/g, '');
-
- textContent = textContent.replace(/\u200B/g, '');
-
-
-
- if (!goog.dom.BrowserFeature.CAN_USE_INNER_TEXT) {
- textContent = textContent.replace(/ +/g, ' ');
- }
- if (textContent != ' ') {
- textContent = textContent.replace(/^\s*/, '');
- }
- return textContent;
- };
- goog.dom.getRawTextContent = function(node) {
- var buf = [];
- goog.dom.getTextContent_(node, buf, false);
- return buf.join('');
- };
- goog.dom.getTextContent_ = function(node, buf, normalizeWhitespace) {
- if (node.nodeName in goog.dom.TAGS_TO_IGNORE_) {
-
- } else if (node.nodeType == goog.dom.NodeType.TEXT) {
- if (normalizeWhitespace) {
- buf.push(String(node.nodeValue).replace(/(\r\n|\r|\n)/g, ''));
- } else {
- buf.push(node.nodeValue);
- }
- } else if (node.nodeName in goog.dom.PREDEFINED_TAG_VALUES_) {
- buf.push(goog.dom.PREDEFINED_TAG_VALUES_[node.nodeName]);
- } else {
- var child = node.firstChild;
- while (child) {
- goog.dom.getTextContent_(child, buf, normalizeWhitespace);
- child = child.nextSibling;
- }
- }
- };
- goog.dom.getNodeTextLength = function(node) {
- return goog.dom.getTextContent(node).length;
- };
- goog.dom.getNodeTextOffset = function(node, opt_offsetParent) {
- var root = opt_offsetParent || goog.dom.getOwnerDocument(node).body;
- var buf = [];
- while (node && node != root) {
- var cur = node;
- while ((cur = cur.previousSibling)) {
- buf.unshift(goog.dom.getTextContent(cur));
- }
- node = node.parentNode;
- }
-
-
- return goog.string.trimLeft(buf.join('')).replace(/ +/g, ' ').length;
- };
- goog.dom.getNodeAtOffset = function(parent, offset, opt_result) {
- var stack = [parent], pos = 0, cur = null;
- while (stack.length > 0 && pos < offset) {
- cur = stack.pop();
- if (cur.nodeName in goog.dom.TAGS_TO_IGNORE_) {
-
- } else if (cur.nodeType == goog.dom.NodeType.TEXT) {
- var text = cur.nodeValue.replace(/(\r\n|\r|\n)/g, '').replace(/ +/g, ' ');
- pos += text.length;
- } else if (cur.nodeName in goog.dom.PREDEFINED_TAG_VALUES_) {
- pos += goog.dom.PREDEFINED_TAG_VALUES_[cur.nodeName].length;
- } else {
- for (var i = cur.childNodes.length - 1; i >= 0; i--) {
- stack.push(cur.childNodes[i]);
- }
- }
- }
- if (goog.isObject(opt_result)) {
- opt_result.remainder = cur ? cur.nodeValue.length + offset - pos - 1 : 0;
- opt_result.node = cur;
- }
- return cur;
- };
- goog.dom.isNodeList = function(val) {
-
-
-
- if (val && typeof val.length == 'number') {
-
- if (goog.isObject(val)) {
-
-
- return typeof val.item == 'function' || typeof val.item == 'string';
- } else if (goog.isFunction(val)) {
-
-
- return typeof val.item == 'function';
- }
- }
-
- return false;
- };
- goog.dom.getAncestorByTagNameAndClass = function(
- element, opt_tag, opt_class, opt_maxSearchSteps) {
- if (!opt_tag && !opt_class) {
- return null;
- }
- var tagName = opt_tag ? String(opt_tag).toUpperCase() : null;
- return (goog.dom.getAncestor(element, function(node) {
- return (!tagName || node.nodeName == tagName) &&
- (!opt_class ||
- goog.isString(node.className) &&
- goog.array.contains(node.className.split(/\s+/), opt_class));
- }, true, opt_maxSearchSteps));
- };
- goog.dom.getAncestorByClass = function(element, className, opt_maxSearchSteps) {
- return goog.dom.getAncestorByTagNameAndClass(
- element, null, className, opt_maxSearchSteps);
- };
- goog.dom.getAncestor = function(
- element, matcher, opt_includeNode, opt_maxSearchSteps) {
- if (element && !opt_includeNode) {
- element = element.parentNode;
- }
- var steps = 0;
- while (element &&
- (opt_maxSearchSteps == null || steps <= opt_maxSearchSteps)) {
- goog.asserts.assert(element.name != 'parentNode');
- if (matcher(element)) {
- return element;
- }
- element = element.parentNode;
- steps++;
- }
-
- return null;
- };
- goog.dom.getActiveElement = function(doc) {
- try {
- return doc && doc.activeElement;
- } catch (e) {
-
-
-
-
-
-
-
- }
- return null;
- };
- goog.dom.getPixelRatio = function() {
- var win = goog.dom.getWindow();
- if (goog.isDef(win.devicePixelRatio)) {
- return win.devicePixelRatio;
- } else if (win.matchMedia) {
-
-
- return goog.dom.matchesPixelRatio_(3) || goog.dom.matchesPixelRatio_(2) ||
- goog.dom.matchesPixelRatio_(1.5) || goog.dom.matchesPixelRatio_(1) ||
- .75;
- }
- return 1;
- };
- goog.dom.matchesPixelRatio_ = function(pixelRatio) {
- var win = goog.dom.getWindow();
-
- var dpiPerDppx = 96;
- var query =
-
- '(min-resolution: ' + pixelRatio + 'dppx),' +
-
- '(min--moz-device-pixel-ratio: ' + pixelRatio + '),' +
-
-
- '(min-resolution: ' + (pixelRatio * dpiPerDppx) + 'dpi)';
- return win.matchMedia(query).matches ? pixelRatio : 0;
- };
- goog.dom.getCanvasContext2D = function(canvas) {
- return (canvas.getContext('2d'));
- };
- goog.dom.DomHelper = function(opt_document) {
-
- this.document_ = opt_document || goog.global.document || document;
- };
- goog.dom.DomHelper.prototype.getDomHelper = goog.dom.getDomHelper;
- goog.dom.DomHelper.prototype.setDocument = function(document) {
- this.document_ = document;
- };
- goog.dom.DomHelper.prototype.getDocument = function() {
- return this.document_;
- };
- goog.dom.DomHelper.prototype.getElement = function(element) {
- return goog.dom.getElementHelper_(this.document_, element);
- };
- goog.dom.DomHelper.prototype.getRequiredElement = function(id) {
- return goog.dom.getRequiredElementHelper_(this.document_, id);
- };
- goog.dom.DomHelper.prototype.$ = goog.dom.DomHelper.prototype.getElement;
- goog.dom.DomHelper.prototype.getElementsByTagName =
- function(tagName, opt_parent) {
- var parent = opt_parent || this.document_;
- return parent.getElementsByTagName(String(tagName));
- };
- goog.dom.DomHelper.prototype.getElementsByTagNameAndClass = function(
- opt_tag, opt_class, opt_el) {
- return goog.dom.getElementsByTagNameAndClass_(
- this.document_, opt_tag, opt_class, opt_el);
- };
- goog.dom.DomHelper.prototype.getElementByTagNameAndClass = function(
- opt_tag, opt_class, opt_el) {
- return goog.dom.getElementByTagNameAndClass_(
- this.document_, opt_tag, opt_class, opt_el);
- };
- goog.dom.DomHelper.prototype.getElementsByClass = function(className, opt_el) {
- var doc = opt_el || this.document_;
- return goog.dom.getElementsByClass(className, doc);
- };
- goog.dom.DomHelper.prototype.getElementByClass = function(className, opt_el) {
- var doc = opt_el || this.document_;
- return goog.dom.getElementByClass(className, doc);
- };
- goog.dom.DomHelper.prototype.getRequiredElementByClass = function(
- className, opt_root) {
- var root = opt_root || this.document_;
- return goog.dom.getRequiredElementByClass(className, root);
- };
- goog.dom.DomHelper.prototype.$$ =
- goog.dom.DomHelper.prototype.getElementsByTagNameAndClass;
- goog.dom.DomHelper.prototype.setProperties = goog.dom.setProperties;
- goog.dom.DomHelper.prototype.getViewportSize = function(opt_window) {
-
-
- return goog.dom.getViewportSize(opt_window || this.getWindow());
- };
- goog.dom.DomHelper.prototype.getDocumentHeight = function() {
- return goog.dom.getDocumentHeight_(this.getWindow());
- };
- goog.dom.Appendable;
- goog.dom.DomHelper.prototype.createDom = function(
- tagName, opt_attributes, var_args) {
- return goog.dom.createDom_(this.document_, arguments);
- };
- goog.dom.DomHelper.prototype.$dom = goog.dom.DomHelper.prototype.createDom;
- goog.dom.DomHelper.prototype.createElement = function(name) {
- return goog.dom.createElement_(this.document_, name);
- };
- goog.dom.DomHelper.prototype.createTextNode = function(content) {
- return this.document_.createTextNode(String(content));
- };
- goog.dom.DomHelper.prototype.createTable = function(
- rows, columns, opt_fillWithNbsp) {
- return goog.dom.createTable_(
- this.document_, rows, columns, !!opt_fillWithNbsp);
- };
- goog.dom.DomHelper.prototype.safeHtmlToNode = function(html) {
- return goog.dom.safeHtmlToNode_(this.document_, html);
- };
- goog.dom.DomHelper.prototype.isCss1CompatMode = function() {
- return goog.dom.isCss1CompatMode_(this.document_);
- };
- goog.dom.DomHelper.prototype.getWindow = function() {
- return goog.dom.getWindow_(this.document_);
- };
- goog.dom.DomHelper.prototype.getDocumentScrollElement = function() {
- return goog.dom.getDocumentScrollElement_(this.document_);
- };
- goog.dom.DomHelper.prototype.getDocumentScroll = function() {
- return goog.dom.getDocumentScroll_(this.document_);
- };
- goog.dom.DomHelper.prototype.getActiveElement = function(opt_doc) {
- return goog.dom.getActiveElement(opt_doc || this.document_);
- };
- goog.dom.DomHelper.prototype.appendChild = goog.dom.appendChild;
- goog.dom.DomHelper.prototype.append = goog.dom.append;
- goog.dom.DomHelper.prototype.canHaveChildren = goog.dom.canHaveChildren;
- goog.dom.DomHelper.prototype.removeChildren = goog.dom.removeChildren;
- goog.dom.DomHelper.prototype.insertSiblingBefore = goog.dom.insertSiblingBefore;
- goog.dom.DomHelper.prototype.insertSiblingAfter = goog.dom.insertSiblingAfter;
- goog.dom.DomHelper.prototype.insertChildAt = goog.dom.insertChildAt;
- goog.dom.DomHelper.prototype.removeNode = goog.dom.removeNode;
- goog.dom.DomHelper.prototype.replaceNode = goog.dom.replaceNode;
- goog.dom.DomHelper.prototype.flattenElement = goog.dom.flattenElement;
- goog.dom.DomHelper.prototype.getChildren = goog.dom.getChildren;
- goog.dom.DomHelper.prototype.getFirstElementChild =
- goog.dom.getFirstElementChild;
- goog.dom.DomHelper.prototype.getLastElementChild = goog.dom.getLastElementChild;
- goog.dom.DomHelper.prototype.getNextElementSibling =
- goog.dom.getNextElementSibling;
- goog.dom.DomHelper.prototype.getPreviousElementSibling =
- goog.dom.getPreviousElementSibling;
- goog.dom.DomHelper.prototype.getNextNode = goog.dom.getNextNode;
- goog.dom.DomHelper.prototype.getPreviousNode = goog.dom.getPreviousNode;
- goog.dom.DomHelper.prototype.isNodeLike = goog.dom.isNodeLike;
- goog.dom.DomHelper.prototype.isElement = goog.dom.isElement;
- goog.dom.DomHelper.prototype.isWindow = goog.dom.isWindow;
- goog.dom.DomHelper.prototype.getParentElement = goog.dom.getParentElement;
- goog.dom.DomHelper.prototype.contains = goog.dom.contains;
- goog.dom.DomHelper.prototype.compareNodeOrder = goog.dom.compareNodeOrder;
- goog.dom.DomHelper.prototype.findCommonAncestor = goog.dom.findCommonAncestor;
- goog.dom.DomHelper.prototype.getOwnerDocument = goog.dom.getOwnerDocument;
- goog.dom.DomHelper.prototype.getFrameContentDocument =
- goog.dom.getFrameContentDocument;
- goog.dom.DomHelper.prototype.getFrameContentWindow =
- goog.dom.getFrameContentWindow;
- goog.dom.DomHelper.prototype.setTextContent = goog.dom.setTextContent;
- goog.dom.DomHelper.prototype.getOuterHtml = goog.dom.getOuterHtml;
- goog.dom.DomHelper.prototype.findNode = goog.dom.findNode;
- goog.dom.DomHelper.prototype.findNodes = goog.dom.findNodes;
- goog.dom.DomHelper.prototype.isFocusableTabIndex = goog.dom.isFocusableTabIndex;
- goog.dom.DomHelper.prototype.setFocusableTabIndex =
- goog.dom.setFocusableTabIndex;
- goog.dom.DomHelper.prototype.isFocusable = goog.dom.isFocusable;
- goog.dom.DomHelper.prototype.getTextContent = goog.dom.getTextContent;
- goog.dom.DomHelper.prototype.getNodeTextLength = goog.dom.getNodeTextLength;
- goog.dom.DomHelper.prototype.getNodeTextOffset = goog.dom.getNodeTextOffset;
- goog.dom.DomHelper.prototype.getNodeAtOffset = goog.dom.getNodeAtOffset;
- goog.dom.DomHelper.prototype.isNodeList = goog.dom.isNodeList;
- goog.dom.DomHelper.prototype.getAncestorByTagNameAndClass =
- goog.dom.getAncestorByTagNameAndClass;
- goog.dom.DomHelper.prototype.getAncestorByClass = goog.dom.getAncestorByClass;
- goog.dom.DomHelper.prototype.getAncestor = goog.dom.getAncestor;
- goog.dom.DomHelper.prototype.getCanvasContext2D = goog.dom.getCanvasContext2D;
|