根据模板pageId获取模板的DOM对象
@access private
@param {string} pageId
@return  {HtmlElement}
513807
function getTemplateDOMById(pageId) {
  if (pageId.indexOf("?") !== -1) {
    pageId = pageId.substring(0, pageId.indexOf("?"));
  }
  return $(this.templateDB[pageId])[0];
}
746314
function newInstance({Class, id, pageId}) {
  const typeofName = (typeof Class).toLowerCase();

  const ctDataMode = getTemplateConfig.call(this, pageId, "ct-data-mode");

  let Constructor;

  /***
   * 如果Class可以实例化
   */
  if (typeofName === "function") {
    Constructor = Class;
  }
  /***
   * 如果Class不可以实例化则用缺省的Page进行实例化
   */
  else if (typeofName === "undefined") {
    Constructor = Page;
  }

  if (!Constructor) {
    throw "页面管理类无法初始化";
    return false;
  }

  /***
   * 如果是singleInstance 或 singleInstanceResult
   */
  if (ctDataMode.toLowerCase().indexOf("singleinstance") !== -1) {
    if (!this.getSingleInstance(pageId)) {
      this.singleInstances[pageId] = new Constructor(this, id);
    }
    return this.singleInstances[pageId];
  } else {
    return new Constructor(this, id);
  }
}
352001
public function getSinglePageDownloadUrl($pageId)
    {
        try {
            $response = $this->client->get($this->PagesUrl . '/' . $pageId, [
                'headers' => ['Authorization' => 'Bearer '. $this->login->apiKey],
                'verify' => $this->certFile,
            ]);

            $body = json_decode($response->getBody(), true);
            $url = $body['_meta']['publishUrl'];
            $responseText = ['url' => $url];

            $response = [
                'code' => '200',
                'response' => json_encode($responseText),
                'error' => false
            ];

        } catch (ClientException $e) {
            $httpResponse = $e->getResponse();
            // 404 means their Leadpage in their account probably got deleted
            if ($httpResponse->getStatusCode() == 404) {
                $response = [
                    'code' => $httpResponse->getStatusCode(),
                    'response' => "
                    Your Leadpage could not be found! Please make sure it is published in your Leadpages Account <br />
                    <br />
                    Support Info:<br />
                    <strong>Page id:</strong> {$pageId} <br />
                    <strong>Page url:</strong> {$this->PagesUrl}/{$pageId}",
                    'error' => true
                ];

            } else {
                $message = 'Something went wrong, please contact Leadpages support.';
                $response = $this->parseException($e);
            }

        } catch (ServerException $e) {
            $response = $this->parseException($e);

        } catch (ConnectException $e) {
            $message = 'Can not connect to Leadpages Server:';
            $response = $this->parseException($e, $message);

        } catch (RequestException $e) {
            $response = $this->parseException($e);
        }

        return $response;
    }
518495
def get_page_content(id):
    
    data = _json.loads(_api.rest("/" + str(id) + "?expand=body.storage"))
    return data["body"]["storage"]["value"]
29396
function rndid(len) {
  len = len || 8;
  const id = rndm(len);

  if (document.getElementById(id)) {
    return rndid(len);
  }

  return id;
}
1165916
function (elementId, containerId) {
            var container = this.$containers[containerId];
            if (!container) {
                // TODO: remove this shit
                container = this.createContainer({'class': containerId + "-container"});
                this.$containers[containerId] = container;
                this.addChild(container);
                if (this.$containerOrder[containerId]) {
                    container.setChildIndex(this.$containerOrder[containerId]);
                }
            }

            var element = this.$elements[containerId + "_" + elementId];
            if (!element) {
                element = this.createContainer({});
                container.addChild(element);
            }

            return element.$el;
        }
716500
protected static function getConfigurationPageIdToUse($pageId)
    {
        $extensionConfiguration = GeneralUtility::makeInstance(ExtensionConfiguration::class);
        if ($extensionConfiguration->getIsUseConfigurationFromClosestTemplateEnabled()) {
            /** @var $configurationPageResolve ConfigurationPageResolver */
            $configurationPageResolver = GeneralUtility::makeInstance(ConfigurationPageResolver::class);
            $pageId = $configurationPageResolver->getClosestPageIdWithActiveTemplate($pageId);
            return $pageId;
        }
        return $pageId;
    }
134766
function (id) {
    /* Get the corresponding html element. */
    var domelt = document.querySelector(id);
    if (!domelt) {
      return { on: function () {} };
    }

    /* Now that we have the elt and onprop, assign it. */
    domelt.on = onprop;
    return domelt;
  }
433685
function (id) {
            var node;
            if (this.children && this.children.length) {
                for (var i = 0, ci; ci = this.children[i++];) {
                    if (node = getNodeById(ci, id)) {
                        return node;
                    }
                }
            }
        }
1161960
function (pageNum) {
            var imgPath = util.template(config.template.img, { page: pageNum });
            return config.url + imgPath + config.queryString;
        }
575340
def getElementById(self, _id):
        '''
            
        '''
        for tag in self:
            if tag.id == _id:
                return tag
            for subtag in tag.children:
                tmp = subtag.getElementById(_id)
                if tmp is not None:
                    return tmp
        return None
996023
function(id) {
    if (id && (id = id.trim())) {

      // js embend 同名.html 而 同名.html 又开启了依赖同名.js，然后就出现了，自己依赖自己了。
      // 所以这里做了 id !== this.id 的判断
      if (id !== this.id && !~this.requires.indexOf(id)) {
        this.requires.push(id);
      }

      // 如果在异步依赖中，则需要把它删了。
      var idx;
      if (~(idx = this.asyncs.indexOf(id))) {
        this.asyncs.splice(idx, 1);
      }

      return id;
    }
    return false;
  }
672205
public void setHtmlElementId(String id) {
		htmlElementId = id;
		mapWidget.setHtmlElement(DOM.getElementById(id));
		mapWidget.draw();
	}
298230
function _generateId(el) {
		var str = el.tagName + el.className + el.src + el.href + el.textContent,
			i = str.length,
			sum = 0;

		while (i--) {
			sum += str.charCodeAt(i);
		}

		return sum.toString(36);
	}
519734
public final int pageY() {
    if (getTouches() != null &&  getTouches().length() > 0) {
      return getTouches().get(0).getPageY();
    } else {
      return getClientY() + GQuery.document.getScrollTop();
    }
  }
479763
def get_page_from_string_or_id(page_string, lang=None):
    """"""
    if type(page_string) == int:
        return Page.objects.get(pk=int(page_string))
    # if we have a string coming from some templates templates
    if (isinstance(page_string, SafeText) or
            isinstance(page_string, str)):
        if page_string.isdigit():
            return Page.objects.get(pk=int(page_string))
        return Page.objects.from_path(page_string, lang)
    # in any other case we return the input becasue it's probably
    # a Page object.
    return page_string
1189003
function(element, dataId, cb) {
    localforage.getItem(dataId, function localforageGetItemCallback(err, data) {
      $myelements.debug("Trying to get localstorage data for scope: %s", dataId);
      if (err) {
        return cb(err, data);
      }
      if (!data) {
        $myelements.debug("No localstorage for scope: %s", dataId);
        return cb(new Error("No localstorage data for DataId " + dataId));
      } else {
        $myelements.debug("Got localstorage for scope: %s", dataId);
        return cb(null, data);
      }
    });
  }