Old js bootstrap file contents missing in GWT 1.4 bootstrap js file

12 views
Skip to first unread message

Neeraj Upreti

unread,
Sep 13, 2007, 2:59:04 AM9/13/07
to Google Web Toolkit
Hi all,

Before 1.4 "gwt.js" was used in the bootstrap process.

We used " __gwt_getMetaProperty(name)" method of gwt.js file. Now the
generated nocache.js file for bootstrap does not contain that method.

Please tell me where that method can be found .. also if that method
is replaced by any other method or JavaScript snippet then plz tell
that method .. at present we have to copy the snippet from the old
gwt.js file to the new nocache.js file for our working.

Any help will be highly appreciated. The snippet copied is given
below:

Snippet copied from gwt.js to <modulename>.nocache.js file:
------------------------------------------
var __gwt_metaProps = {};

function __gwt_processMetas() {
var metas = document.getElementsByTagName("meta");
for (var i = 0, n = metas.length; i < n; ++i) {
var meta = metas[i];
var name = meta.getAttribute("name");
if (name) {
if (name == "gwt:module") {
var moduleName = meta.getAttribute("content");
if (moduleName) {
__gwt_moduleControlBlocks.add(meta, moduleName);
}
} else if (name == "gwt:property") {
var content = meta.getAttribute("content");
if (content) {
var name = content, value = "";
var eq = content.indexOf("=");
if (eq != -1) {
name = content.substring(0, eq);
value = content.substring(eq+1);
}
__gwt_metaProps[name] = value;
}
} else if (name == "gwt:onPropertyErrorFn") {
var content = meta.getAttribute("content");
if (content) {
try {
__gwt_onPropertyError = eval(content);
} catch (e) {
window.alert("Bad handler \"" + content +
"\" for \"gwt:onPropertyErrorFn\"");
}
}
} else if (name == "gwt:onLoadErrorFn") {
var content = meta.getAttribute("content");
if (content) {
try {
__gwt_onLoadError = eval(content);
} catch (e) {
window.alert("Bad handler \"" + content +
"\" for \"gwt:onLoadErrorFn\"");
} } } } } }

/**
* Determines the value of a deferred binding client property
specified
* statically in host html.
*/
function __gwt_getMetaProperty(name) {
var value = __gwt_metaProps[name];
if (value) {
return value;
} else {
return null;
} }
------------------------------------------

Thanks in advance,
Neeraj

Reply all
Reply to author
Forward
0 new messages