Currently HTMLDocument::jsxSet_domain(final String) forbids setting a new domain value if the previous domain was blank, "". The current block of code:
if (newDomain.indexOf('.') == -1
|| !currentDomain.toLowerCase().endsWith("." + newDomain.toLowerCase())) {
throw Context.reportRuntimeError("Illegal domain value, cannot set domain from: \""
+ currentDomain + "\" to: \"" + newDomain + "\"");
}
Why does a previous domain without a '.' forbid updating to a domain with a '.'? Could you at least add a currentDomain.length() != 0 && () to the check?
I am also having an issue with this. The check as suggested would be a nice fix.
How do you create a page with an empty domain?
Now fixed in SVN. Thanks for reporting.