com.gargoylesoftware.htmlunit.javascript
Class IEWeirdSyntaxScriptPreProcessor
java.lang.Object
com.gargoylesoftware.htmlunit.javascript.IEWeirdSyntaxScriptPreProcessor
- All Implemented Interfaces:
- ScriptPreProcessor
public class IEWeirdSyntaxScriptPreProcessor
- extends Object
- implements ScriptPreProcessor
A script preprocessor removing weird syntax supported by IE like semicolons before catch
or
before finally
in a try-catch-finally block.
- Version:
- $Revision: 6701 $
- Author:
- Marc Guillemot
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
IEWeirdSyntaxScriptPreProcessor
public IEWeirdSyntaxScriptPreProcessor()
getInstance
public static IEWeirdSyntaxScriptPreProcessor getInstance()
- Gets an instance of the pre processor.
- Returns:
- an instance
preProcess
public String preProcess(HtmlPage htmlPage,
String sourceCode,
String sourceName,
int lineNumber,
HtmlElement htmlElement)
- Pre process the specified source code in the context of the given page.
- Specified by:
preProcess
in interface ScriptPreProcessor
- Parameters:
htmlPage
- the pagesourceCode
- the code to executesourceName
- a name for the chunk of code that is going to be executed (used in error messages)lineNumber
- the line number of the source codehtmlElement
- the HTML element that will act as the context
- Returns:
- the source code after pre processing
Copyright © 2002-2012 Gargoyle Software Inc.. All Rights Reserved.