You have to escape .
with \\
before querying for elements.
Replace
document.querySelector('#.someMethodName');
To
document.querySelector('#\\.someMethodName');
Also note that technically, for HTML 4 required ID value format is specified below:
ID and NAME tokens must begin with a letter ([A-Za-z]) and may be followed by any number of letters, digits ([0-9]), hyphens ("-"), underscores ("_"), colons (":"), and periods (".").
So .[A-Za-z]
is invalid one..