_id stringlengths 2 6 | title stringlengths 0 58 | partition stringclasses 3
values | text stringlengths 52 373k | language stringclasses 1
value | meta_information dict |
|---|---|---|---|---|---|
q29800 | train | function (element) {
var oFooter = this.footer || (this.footer = createFooter());
oFooter.appendChild(element);
this.changeFooterEvent.fire(element);
this.changeContentEvent.fire();
} | javascript | {
"resource": ""
} | |
q29801 | train | function(moduleElement){
moduleElement = moduleElement || this.element;
// Need to get everything into the DOM if it isn't already
if (this.header && !Dom.inDocument(this.header)) {
// There is a header, but it's not in the DOM yet. Need to add it.
va... | javascript | {
"resource": ""
} | |
q29802 | train | function(moduleElement){
moduleElement = moduleElement || this.element;
if (this.body && !Dom.inDocument(this.body)) {
// There is a body, but it's not in the DOM yet. Need to add it.
if (this.footer && Dom.isAncestor(moduleElement, this.footer)) {
... | javascript | {
"resource": ""
} | |
q29803 | train | function(moduleElement){
moduleElement = moduleElement || this.element;
if (this.footer && !Dom.inDocument(this.footer)) {
// There is a footer, but it's not in the DOM yet. Need to add it.
moduleElement.appendChild(this.footer);
}
} | javascript | {
"resource": ""
} | |
q29804 | train | function () {
var parent;
if (this.element) {
Event.purgeElement(this.element, true);
parent = this.element.parentNode;
}
if (parent) {
parent.removeChild(this.element);
}
this.element = n... | javascript | {
"resource": ""
} | |
q29805 | train | function (type, args, obj) {
var monitor = args[0];
if (monitor) {
this.initResizeMonitor();
} else {
Module.textResizeEvent.unsubscribe(this.onDomResize, this, true);
this.resizeMonitor = null;
}
} | javascript | {
"resource": ""
} | |
q29806 | train | function () {
Overlay.superclass.initEvents.call(this);
var SIGNATURE = CustomEvent.LIST;
/**
* CustomEvent fired before the Overlay is moved.
* @event beforeMoveEvent
* @param {Number} x x coordinate
* @param {Number} y y coordinate... | javascript | {
"resource": ""
} | |
q29807 | train | function(show) {
Dom.setStyle(this.element, "visibility", (show) ? "visible" : "hidden");
var hiddenClass = Overlay.CSS_HIDDEN;
if (show) {
Dom.removeClass(this.element, hiddenClass);
} else {
Dom.addClass(this.element, hiddenClass);
... | javascript | {
"resource": ""
} | |
q29808 | train | function (type, args, obj) {
var val = args[0],
alreadySubscribed = Config.alreadySubscribed,
windowResizeEvent = Overlay.windowResizeEvent,
windowScrollEvent = Overlay.windowScrollEvent;
if (val) {
this.center();
... | javascript | {
"resource": ""
} | |
q29809 | train | function (type, args, obj) {
var height = args[0],
el = this.element;
Dom.setStyle(el, "height", height);
this.cfg.refireEvent("iframe");
} | javascript | {
"resource": ""
} | |
q29810 | train | function (type, args, obj) {
var x = args[0],
y = this.cfg.getProperty("y");
this.cfg.setProperty("x", x, true);
this.cfg.setProperty("y", y, true);
this.beforeMoveEvent.fire([x, y]);
x = this.cfg.getProperty("x");
y = this.cfg.... | javascript | {
"resource": ""
} | |
q29811 | train | function () {
var oIFrame = this.iframe,
oParentNode;
if (oIFrame) {
oParentNode = this.element.parentNode;
if (oParentNode != oIFrame.parentNode) {
this._addToParent(oParentNode, oIFrame);
}
o... | javascript | {
"resource": ""
} | |
q29812 | train | function () {
var oIFrame = this.iframe,
oElement = this.element,
nOffset = Overlay.IFRAME_OFFSET,
nDimensionOffset = (nOffset * 2),
aXY;
if (oIFrame) {
// Size <iframe>
oIFrame.style.width = (oElem... | javascript | {
"resource": ""
} | |
q29813 | train | function () {
if (this.iframe) {
var overlayZ = Dom.getStyle(this.element, "zIndex");
if (!YAHOO.lang.isUndefined(overlayZ) && !isNaN(overlayZ)) {
Dom.setStyle(this.iframe, "zIndex", (overlayZ - 1));
}
}
} | javascript | {
"resource": ""
} | |
q29814 | train | function (type, args, obj) {
var bIFrame = args[0];
function createIFrame() {
var oIFrame = this.iframe,
oElement = this.element,
oParent;
if (!oIFrame) {
if (!m_oIFrameTemplate) {
... | javascript | {
"resource": ""
} | |
q29815 | train | function() {
if (YAHOO.lang.isUndefined(this.cfg.getProperty("xy"))) {
// Set CFG XY based on DOM XY
this.syncPosition();
// Account for XY being set silently in syncPosition (no moveTo fired/called)
this.cfg.refireEvent("xy");
... | javascript | {
"resource": ""
} | |
q29816 | train | function (type, args, obj) {
var val = args[0];
if (val) {
if (! Config.alreadySubscribed(this.beforeMoveEvent, this.enforceConstraints, this)) {
this.beforeMoveEvent.subscribe(this.enforceConstraints, this, true);
}
if (! Conf... | javascript | {
"resource": ""
} | |
q29817 | train | function(t) {
var tce = null;
if (t instanceof CustomEvent) {
tce = t;
} else if (Overlay._TRIGGER_MAP[t]) {
tce = Overlay._TRIGGER_MAP[t];
}
return tce;
} | javascript | {
"resource": ""
} | |
q29818 | train | function(triggers, mode, fn) {
var t, tce;
for (var i = 0, l = triggers.length; i < l; ++i) {
t = triggers[i];
tce = this._findTriggerCE(t);
if (tce) {
tce[mode](fn, this, true);
} else {
thi... | javascript | {
"resource": ""
} | |
q29819 | train | function (type, args, obj) {
var pos = args[0];
var cXY = this.getConstrainedXY(pos[0], pos[1]);
this.cfg.setProperty("x", cXY[0], true);
this.cfg.setProperty("y", cXY[1], true);
this.cfg.setProperty("xy", cXY, true);
} | javascript | {
"resource": ""
} | |
q29820 | train | function(pos, val) {
var overlayEl = this.element,
buffer = Overlay.VIEWPORT_OFFSET,
x = (pos == "x"),
overlaySize = (x) ? overlayEl.offsetWidth : overlayEl.offsetHeight,
viewportSize = (x) ? Dom.getViewportWidth() : Dom.getViewpor... | javascript | {
"resource": ""
} | |
q29821 | train | function () {
var nViewportOffset = Overlay.VIEWPORT_OFFSET,
elementWidth = this.element.offsetWidth,
elementHeight = this.element.offsetHeight,
viewPortWidth = Dom.getViewportWidth(),
viewPortHeight = Dom.getViewportHeight(),
... | javascript | {
"resource": ""
} | |
q29822 | train | function () {
var pos = Dom.getXY(this.element);
this.cfg.setProperty("x", pos[0], true);
this.cfg.setProperty("y", pos[1], true);
this.cfg.setProperty("xy", pos, true);
} | javascript | {
"resource": ""
} | |
q29823 | train | function(type, args, el) {
var height = this.cfg.getProperty("height");
if ((height && height !== "auto") || (height === 0)) {
this.fillHeight(el);
}
} | javascript | {
"resource": ""
} | |
q29824 | train | function(el) {
var height = el.offsetHeight;
if (el.getBoundingClientRect) {
var rect = el.getBoundingClientRect();
height = rect.bottom - rect.top;
}
return height;
} | javascript | {
"resource": ""
} | |
q29825 | train | function () {
var aOverlays = [],
oElement = this.element;
function compareZIndexDesc(p_oOverlay1, p_oOverlay2) {
var sZIndex1 = Dom.getStyle(p_oOverlay1, "zIndex"),
sZIndex2 = Dom.getStyle(p_oOverlay2, "zIndex"),
nZInde... | javascript | {
"resource": ""
} | |
q29826 | train | function () {
if (this.iframe) {
this.iframe.parentNode.removeChild(this.iframe);
}
this.iframe = null;
Overlay.windowResizeEvent.unsubscribe(
this.doCenterOnDOMEvent, this);
Overlay.windowScrollEvent.unsubscribe(
... | javascript | {
"resource": ""
} | |
q29827 | train | function(overlay) {
var mgr = this;
if (!overlay.focusEvent) {
overlay.focusEvent = overlay.createEvent("focus");
overlay.focusEvent.signature = CustomEvent.LIST;
overlay.focusEvent._managed = true;
} else {
overlay.foc... | javascript | {
"resource": ""
} | |
q29828 | train | function(overlay) {
var mgr = this;
if (!overlay.blurEvent) {
overlay.blurEvent = overlay.createEvent("blur");
overlay.blurEvent.signature = CustomEvent.LIST;
overlay.focusEvent._managed = true;
} else {
overlay.blurEve... | javascript | {
"resource": ""
} | |
q29829 | train | function (overlay) {
var registered = false,
i,
n;
if (overlay instanceof Overlay) {
overlay.cfg.addProperty("manager", { value: this } );
this._bindFocus(overlay);
this._bindBlur(overlay);
this._... | javascript | {
"resource": ""
} | |
q29830 | train | function (p_oOverlay) {
var oOverlay = this.find(p_oOverlay),
nTopZIndex,
oTopOverlay,
aOverlays;
if (oOverlay) {
aOverlays = this.overlays;
aOverlays.sort(this.compareZIndexDesc);
oTopOverlay = a... | javascript | {
"resource": ""
} | |
q29831 | train | function (overlay) {
var isInstance = overlay instanceof Overlay,
overlays = this.overlays,
n = overlays.length,
found = null,
o,
i;
if (isInstance || typeof overlay == "string") {
for (i = n-1; i >... | javascript | {
"resource": ""
} | |
q29832 | train | function (o1, o2) {
var zIndex1 = (o1.cfg) ? o1.cfg.getProperty("zIndex") : null, // Sort invalid (destroyed)
zIndex2 = (o2.cfg) ? o2.cfg.getProperty("zIndex") : null; // objects at bottom.
if (zIndex1 === null && zIndex2 === null) {
return 0;
} else... | javascript | {
"resource": ""
} | |
q29833 | train | function () {
var overlays = this.overlays,
n = overlays.length,
i;
for (i = n - 1; i >= 0; i--) {
overlays[i].show();
}
} | javascript | {
"resource": ""
} | |
q29834 | train | function () {
var overlays = this.overlays,
n = overlays.length,
i;
for (i = n - 1; i >= 0; i--) {
overlays[i].hide();
}
} | javascript | {
"resource": ""
} | |
q29835 | train | function (el, userConfig) {
Tooltip.superclass.init.call(this, el);
this.beforeInitEvent.fire(Tooltip);
Dom.addClass(this.element, Tooltip.CSS_TOOLTIP);
if (userConfig) {
this.cfg.applyConfig(userConfig, true);
}
this.cfg.queu... | javascript | {
"resource": ""
} | |
q29836 | train | function () {
Tooltip.superclass.initEvents.call(this);
var SIGNATURE = CustomEvent.LIST;
/**
* CustomEvent fired when user mouses over a context element. Returning false from
* a subscriber to this event will prevent the tooltip from being displayed for
... | javascript | {
"resource": ""
} | |
q29837 | train | function (type, args, obj) {
var container = args[0];
if (typeof container == 'string') {
this.cfg.setProperty("container", document.getElementById(container), true);
}
} | javascript | {
"resource": ""
} | |
q29838 | train | function (e, obj) {
var context = this;
if (context.title) {
obj._tempTitle = context.title;
context.title = "";
}
// Fire first, to honor disabled set in the listner
if (obj.fireEvent("contextMouseOver", context, e) !== false... | javascript | {
"resource": ""
} | |
q29839 | train | function (e, obj) {
var el = this;
if (obj._tempTitle) {
el.title = obj._tempTitle;
obj._tempTitle = null;
}
if (obj.showProcId) {
clearTimeout(obj.showProcId);
obj.showProcId = null;
}
... | javascript | {
"resource": ""
} | |
q29840 | train | function() {
var e = document.createElement("button");
e.style.height = "1px";
e.style.width = "1px";
e.style.position = "absolute";
e.style.left = "-10000em";
e.style.opacity = 0;
e.tabIndex = -1;
this.innerElement.appendCh... | javascript | {
"resource": ""
} | |
q29841 | train | function (type, args, obj) {
var el = this.lastElement;
if (args && args[1]) {
Event.stopEvent(args[1]);
}
if (el) {
try {
el.focus();
} catch(err) {
// Ignore
}
... | javascript | {
"resource": ""
} | |
q29842 | train | function(root) {
root = root || this.innerElement;
var focusable = {};
for (var i = 0; i < Panel.FOCUSABLE.length; i++) {
focusable[Panel.FOCUSABLE[i]] = true;
}
function isFocusable(el) {
if (el.focus && el.type !== "hidden"... | javascript | {
"resource": ""
} | |
q29843 | train | function() {
this.firstElement = null;
this.lastElement = null;
var elements = this.getFocusableElements();
this.focusableElements = elements;
if (elements.length > 0) {
this.firstElement = elements[0];
this.lastElement = ele... | javascript | {
"resource": ""
} | |
q29844 | train | function (type, args, obj) {
var val = args[0];
if (val) {
if (!Util.DD) {
this.cfg.setProperty("draggable", false);
return;
}
if (this.header) {
Dom.setStyle(this.header, "cursor", "mov... | javascript | {
"resource": ""
} | |
q29845 | train | function (type, args, obj) {
var modal = args[0];
if (modal) {
if (!this._hasModalityEventListeners) {
this.subscribe("beforeShow", this.buildMask);
this.subscribe("beforeShow", this.bringToTop);
this.subscribe("before... | javascript | {
"resource": ""
} | |
q29846 | train | function () {
var oMask = this.mask,
oParentNode;
if (oMask) {
/*
Hide the mask before destroying it to ensure that DOM
event handlers on focusable elements get removed.
*/
this.hideMask();
... | javascript | {
"resource": ""
} | |
q29847 | train | function (type, args, obj) {
var listeners = args[0],
listener,
nListeners,
i;
if (listeners) {
if (listeners instanceof Array) {
nListeners = listeners.length;
for (i = 0; i < nL... | javascript | {
"resource": ""
} | |
q29848 | train | function(type, args, obj) {
var val = Lang.merge(DEFAULT_CONFIG.STRINGS.value, args[0]);
this.cfg.setProperty(DEFAULT_CONFIG.STRINGS.key, val, true);
} | javascript | {
"resource": ""
} | |
q29849 | train | function(type, args, el) {
Panel.superclass._autoFillOnHeightChange.apply(this, arguments);
if (bIEQuirks) {
var panel = this;
setTimeout(function() {
panel.sizeUnderlay();
},0);
}
} | javascript | {
"resource": ""
} | |
q29850 | train | function () {
var oUnderlay = this.underlay,
oElement;
if (oUnderlay) {
oElement = this.element;
oUnderlay.style.width = oElement.offsetWidth + "px";
oUnderlay.style.height = oElement.offsetHeight + "px";
}
} | javascript | {
"resource": ""
} | |
q29851 | train | function () {
var oMask = this.mask;
if (!oMask) {
if (!m_oMaskTemplate) {
m_oMaskTemplate = document.createElement("div");
m_oMaskTemplate.className = "mask";
m_oMaskTemplate.innerHTML = " ";
}
... | javascript | {
"resource": ""
} | |
q29852 | train | function () {
if (this.mask) {
// Shrink mask first, so it doesn't affect the document size.
var mask = this.mask,
viewWidth = Dom.getViewportWidth(),
viewHeight = Dom.getViewportHeight();
if (mask.offsetHeight > viewH... | javascript | {
"resource": ""
} | |
q29853 | train | function() {
if (this.mask) {
var panelZ = Dom.getStyle(this.element, "zIndex");
if (!YAHOO.lang.isUndefined(panelZ) && !isNaN(panelZ)) {
Dom.setStyle(this.mask, "zIndex", panelZ - 1);
}
}
} | javascript | {
"resource": ""
} | |
q29854 | train | function () {
Dialog.superclass.initEvents.call(this);
var SIGNATURE = CustomEvent.LIST;
/**
* CustomEvent fired prior to submission
* @event beforeSubmitEvent
*/
this.beforeSubmitEvent =
this.createEvent(EVENT_TYPES... | javascript | {
"resource": ""
} | |
q29855 | train | function (el, userConfig) {
/*
Note that we don't pass the user config in here yet because
we only want it executed once, at the lowest subclass level
*/
Dialog.superclass.init.call(this, el/*, userConfig*/);
this.beforeInitEvent.fir... | javascript | {
"resource": ""
} | |
q29856 | train | function() {
var form = this.element.getElementsByTagName("form")[0];
if (this.form) {
if (this.form == form && Dom.isAncestor(this.element, this.form)) {
return;
} else {
Event.purgeElement(this.form);
... | javascript | {
"resource": ""
} | |
q29857 | train | function() {
Dialog.superclass.setFirstLastFocusable.call(this);
var i, l, el, elements = this.focusableElements;
this.firstFormElement = null;
this.lastFormElement = null;
if (this.form && elements && elements.length > 0) {
l = elements.le... | javascript | {
"resource": ""
} | |
q29858 | train | function (type, args, obj) {
var aButtons = this.cfg.getProperty("buttons"),
el = this.lastFormElement;
if (args && args[1]) {
Event.stopEvent(args[1]);
}
if (aButtons && Lang.isArray(aButtons)) {
this.focusLastButton();
... | javascript | {
"resource": ""
} | |
q29859 | train | function(button) {
var Button = YAHOO.widget.Button;
// If we have an HTML button and YUI Button is on the page,
// get the YUI Button reference if available.
if (Button && button && button.nodeName && button.id) {
button = Button.getButton(button.id) ||... | javascript | {
"resource": ""
} | |
q29860 | train | function () {
var aButtons = this.cfg.getProperty("buttons"),
oButton,
oElement;
if (aButtons && Lang.isArray(aButtons)) {
oButton = aButtons[0];
if (oButton) {
oElement = this._getButton(oButton.htmlButton);
... | javascript | {
"resource": ""
} | |
q29861 | train | function () {
if (this.validate()) {
if (this.beforeSubmitEvent.fire()) {
this.doSubmit();
this.submitEvent.fire();
if (this.cfg.getProperty("hideaftersubmit")) {
this.hide();
}
... | javascript | {
"resource": ""
} | |
q29862 | train | function () {
var oForm = this.form,
aElements,
nTotalElements,
oData,
sName,
oElement,
nElements,
sType,
sTagName,
aOptions,
nOptions,
... | javascript | {
"resource": ""
} | |
q29863 | train | function (el, userConfig) {
/*
Note that we don't pass the user config in here yet because we
only want it executed once, at the lowest subclass level
*/
SimpleDialog.superclass.init.call(this, el/*, userConfig*/);
this.beforeIn... | javascript | {
"resource": ""
} | |
q29864 | train | function (type,args,obj) {
var text = args[0];
if (text) {
this.setBody(text);
this.cfg.refireEvent("icon");
}
} | javascript | {
"resource": ""
} | |
q29865 | train | function(val, sendUpdatedEvt) {
// don't always rewrite the value to able selections with Ctrl+A
var uppered = val.toUpperCase();
if(uppered != this.getValue()) {
inputEx.UpperCaseField.superclass.setValue.call(this, uppered, sendUpdatedEvt);
}
} | javascript | {
"resource": ""
} | |
q29866 | train | function(e) {
inputEx.UpperCaseField.superclass.onKeyPress.call(this,e);
// Re-Apply a toUpperCase method
YAHOO.lang.later(0,this,function() {this.setValue( (this.getValue()) );});
} | javascript | {
"resource": ""
} | |
q29867 | train | function(el, oAttr) {
el = YUD.get(el);
// some sensible defaults
oAttr = oAttr || {};
if(!el) {
el = document.createElement(this.CONFIG.TAG_NAME);
}
if (el.id) {oAttr.id = el.id; }
YAHOO.widget.AccordionView.superclass.const... | javascript | {
"resource": ""
} | |
q29868 | train | function (oAttr) {
AccordionView.superclass.initAttributes.call(this, oAttr);
var bAnimate = (YAHOO.env.modules.animation) ? true : false;
this.setAttributeConfig('id', {
writeOnce: true,
validator: function (value) {
return (/^... | javascript | {
"resource": ""
} | |
q29869 | train | function() {
if(true === this.get('hoverActivated')) {
this.on('mouseover', this._onMouseOver, this, true);
this.on('mouseout', this._onMouseOut, this, true);
}
this.on('click', this._onClick, this, tr... | javascript | {
"resource": ""
} | |
q29870 | train | function() {
YUD.batch(this._panels, function(e) {
var elContent = this.firstChild.nextSibling;
if(elContent) {
YUD.removeClass(e.firstChild, this.CLASSES.ACTIVE);
YUD.addClass(elContent, this.CLASSES.HIDDEN);
this.... | javascript | {
"resource": ""
} | |
q29871 | train | function() {
var aLength = this._panels.length;
var bAllClosed = true;
for(var i=0;i<aLength;i++) {
if(YUD.hasClass(this._panels[i].firstChild, this.CLASSES.ACTIVE)) {
this._panels[i].firstChild.tabIndex = 0;
bAllClosed = false;... | javascript | {
"resource": ""
} | |
q29872 | train | function(index) {
this.removeChild(YUD.getElementsByClassName(this.CLASSES.PANEL, this.CONFIG.ITEM_WRAPPER_TAG_NAME, this)[index]);
var aNewPanels = [];
var nLength = this._panels.length;
for(var i=0;i<nLength;i++) {
if(i !== index) {
... | javascript | {
"resource": ""
} | |
q29873 | train | function(nIndex) {
var ePanelNode = this._panels[nIndex];
if(!ePanelNode) {return false;} // invalid node
if(YUD.hasClass(ePanelNode.firstChild, this.CLASSES.ACTIVE)) {return false;} // already open
this._onClick(ePanelNode.firstChild);
return true;
} | javascript | {
"resource": ""
} | |
q29874 | train | function(ev) {
var eCurrentPanel = YUD.getAncestorByClassName(YUE.getTarget(ev), this.CLASSES.PANEL);
var nKeyCode = YUE.getCharCode(ev);
var nLength = this._panels.length;
if(nKeyCode === 37 || nKeyCode === 38) {
for(var i=0;i<nLength;i++) {
... | javascript | {
"resource": ""
} | |
q29875 | train | function(ev) {
YUE.stopPropagation(ev);
// must provide the TARGET or IE will destroy the event before we can
// use it. Thanks Nicholas Zakas for pointing this out to me
var target = YUE.getTarget(ev);
this._hoverTimer = YAHOO.lang.later(this.get('_hoverTimeo... | javascript | {
"resource": ""
} | |
q29876 | train | function(el) {
var id, nodes, c, i, len, attr;
if (el) {
if (el[NODE_TYPE] || el.item) { // Node, or NodeList
return el;
}
if (typeof el === 'string') { // id
id = el;
el = document.getE... | javascript | {
"resource": ""
} | |
q29877 | train | function(el, property) {
return Y.Dom.batch(el, Y.Dom._getStyle, property);
} | javascript | {
"resource": ""
} | |
q29878 | train | function(el, property, val) {
Y.Dom.batch(el, Y.Dom._setStyle, { prop: property, val: val });
} | javascript | {
"resource": ""
} | |
q29879 | train | function(el, className) {
return Y.Dom.batch(el, Y.Dom._hasClass, className);
} | javascript | {
"resource": ""
} | |
q29880 | train | function(el, className) {
return Y.Dom.batch(el, Y.Dom._addClass, className);
} | javascript | {
"resource": ""
} | |
q29881 | train | function(el, className) {
return Y.Dom.batch(el, Y.Dom._removeClass, className);
} | javascript | {
"resource": ""
} | |
q29882 | train | function(el, oldClassName, newClassName) {
return Y.Dom.batch(el, Y.Dom._replaceClass, { from: oldClassName, to: newClassName });
} | javascript | {
"resource": ""
} | |
q29883 | train | function(el, prefix) {
prefix = prefix || 'yui-gen';
var f = function(el) {
if (el && el.id) { // do not override existing ID
YAHOO.log('generateId returning existing id ' + el.id, 'info', 'Dom');
return el.id;
}
... | javascript | {
"resource": ""
} | |
q29884 | train | function(haystack, needle) {
haystack = Y.Dom.get(haystack);
needle = Y.Dom.get(needle);
var ret = false;
if ( (haystack && needle) && (haystack[NODE_TYPE] && needle[NODE_TYPE]) ) {
if (haystack.contains && haystack !== needle) { // contains ... | javascript | {
"resource": ""
} | |
q29885 | train | function(el, doc) {
return Y.Dom._inDoc(Y.Dom.get(el), doc);
} | javascript | {
"resource": ""
} | |
q29886 | train | function(method, tag, root) {
return Y.Dom.getElementsBy(method, tag, root, null, null, null, true);
} | javascript | {
"resource": ""
} | |
q29887 | train | function() {
var height = self.innerHeight, // Safari, Opera
mode = document[COMPAT_MODE];
if ( (mode || isIE) && !isOpera ) { // IE, Gecko
height = (mode == CSS1_COMPAT) ?
documentElement.clientHeight : // Standards
... | javascript | {
"resource": ""
} | |
q29888 | train | function(node, method) {
while (node) {
node = node.previousSibling;
if ( Y.Dom._testElement(node, method) ) {
return node;
}
}
return null;
} | javascript | {
"resource": ""
} | |
q29889 | train | function(node, method) {
while (node) {
node = node.nextSibling;
if ( Y.Dom._testElement(node, method) ) {
return node;
}
}
return null;
} | javascript | {
"resource": ""
} | |
q29890 | train | function(node, method) {
var child = ( Y.Dom._testElement(node.firstChild, method) ) ? node.firstChild : null;
return child || Y.Dom.getNextSiblingBy(node.firstChild, method);
} | javascript | {
"resource": ""
} | |
q29891 | train | function(node, method) {
if (!node) {
YAHOO.log('getLastChild failed: invalid node argument', 'error', 'Dom');
return null;
}
var child = ( Y.Dom._testElement(node.lastChild, method) ) ? node.lastChild : null;
return child || Y.Dom.getPrevi... | javascript | {
"resource": ""
} | |
q29892 | train | function(node) {
node = Y.Dom.get(node);
return Y.Dom.getLastChildBy(node);
} | javascript | {
"resource": ""
} | |
q29893 | train | function(node, method) {
var child = Y.Dom.getFirstChildBy(node, method),
children = child ? [child] : [];
Y.Dom.getNextSiblingBy(child, function(node) {
if ( !method || method(node) ) {
children[children.length] = node;
}
... | javascript | {
"resource": ""
} | |
q29894 | train | function(doc) {
doc = doc || document;
return Math.max(doc[DOCUMENT_ELEMENT].scrollLeft, doc.body.scrollLeft);
} | javascript | {
"resource": ""
} | |
q29895 | train | function(doc) {
doc = doc || document;
return Math.max(doc[DOCUMENT_ELEMENT].scrollTop, doc.body.scrollTop);
} | javascript | {
"resource": ""
} | |
q29896 | train | function() {
var t = Y.Dom.getDocumentScrollTop(),
l = Y.Dom.getDocumentScrollLeft(),
r = Y.Dom.getViewportWidth() + l,
b = Y.Dom.getViewportHeight() + t;
return new Y.Region(t, r, b, l);
} | javascript | {
"resource": ""
} | |
q29897 | train | function(oData) {
var date = null;
//Convert to date
if(!(oData instanceof Date)) {
date = new Date(oData);
}
else {
return oData;
}
// Validate
if(date instanceof Date) {
return date;
}
else {
YAHOO.log("Could not convert data " + lang.d... | javascript | {
"resource": ""
} | |
q29898 | train | function(nMsec, oRequest, oCallback, oCaller) {
if(lang.isNumber(nMsec) && (nMsec >= 0)) {
YAHOO.log("Enabling polling to live data for \"" + oRequest + "\" at interval " + nMsec, "info", this.toString());
var oSelf = this;
var nId = setInterval(function() {
oSelf.makeConnection(... | javascript | {
"resource": ""
} | |
q29899 | train | function(nId) {
// Remove from tracker if there
var tracker = this._aIntervals || [];
for(var i=tracker.length-1; i>-1; i--) {
if(tracker[i] === nId) {
tracker.splice(i,1);
clearInterval(nId);
}
}
} | javascript | {
"resource": ""
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.