3 examples of 'document getelementbyclass' in JavaScript

Every line of 'document getelementbyclass' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your JavaScript code is secure.

All examples are scanned by Snyk Code

By copying the Snyk Code Snippets you agree to
292getElementsByClassName(className) {
293 if (typeof className !== 'string') return [];
294
295 return this.$_tree.getByClassName(className);
296}
355setElementClassNames(elementClassNames) {
356 // apply to the bg
357 var iframe = goog.dom.getElementsByTagNameAndClass(
358 'iframe', null, this.element)[0];
359 // get the iframe document
360 var iframeDoc = goog.dom.getFrameContentDocument(iframe);
361 // apply css classes of the element
362 // apply it on tag instead of body,
363 // because body represents
364 // the '.silex-element-content' element of Silex text elements
365 // so it has these classes: 'silex-element-content normal'
366 var htmlElement = iframeDoc.getElementsByTagName('html')[0];
367 htmlElement.className = elementClassNames;
368 // body represents the '.silex-element-content' element of Silex text elements
369 // so it has these classes: 'silex-element-content normal'
370 iframeDoc.body.className = 'silex-element-content normal';
371 // keep the size of the text field
372 htmlElement.style.left = '10px';
373 htmlElement.style.right = '20px';
374 htmlElement.style.height = '100%';
375 htmlElement.style.overflowX = 'hidden';
376 htmlElement.style.overflowY = 'scroll';
377 iframeDoc.body.style.height = 'auto';
378 iframeDoc.body.style.position = 'initial';
379 // keep the pointer events which are disabled on element content (see front-end.css)
380 iframeDoc.body.style.pointerEvents = 'auto';
381}
580Video.prototype.getElementByClass = function getElementByClass(className) {
581 return this.element.getElementsByClassName(className)[0];
582};

Related snippets