Best JavaScript code snippet using wpt
pdf-acroform-default-colors-css.ts
Source:pdf-acroform-default-colors-css.ts
...
pdf-acroform-dark-colors-css.ts
Source:pdf-acroform-dark-colors-css.ts
...
styles.ts
Source:styles.ts
1import {css} from 'lit';2export const styles = css`3 /* Copyright 2014 Mozilla Foundation4 *5 * Licensed under the Apache License, Version 2.0 (the "License");6 * you may not use this file except in compliance with the License.7 * You may obtain a copy of the License at8 *9 * http://www.apache.org/licenses/LICENSE-2.010 *11 * Unless required by applicable law or agreed to in writing, software12 * distributed under the License is distributed on an "AS IS" BASIS,13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.14 * See the License for the specific language governing permissions and15 * limitations under the License.16 */17 .textLayer {18 position: absolute;19 left: 0;20 top: 0;21 right: 0;22 bottom: 0;23 overflow: hidden;24 opacity: 0.2;25 line-height: 1;26 }27 .textLayer > span {28 color: transparent;29 position: absolute;30 white-space: pre;31 cursor: text;32 -webkit-transform-origin: 0% 0%;33 transform-origin: 0% 0%;34 }35 .textLayer .highlight {36 margin: -1px;37 padding: 1px;38 background-color: rgb(180, 0, 170);39 border-radius: 4px;40 }41 .textLayer .highlight.begin {42 border-radius: 4px 0px 0px 4px;43 }44 .textLayer .highlight.end {45 border-radius: 0px 4px 4px 0px;46 }47 .textLayer .highlight.middle {48 border-radius: 0px;49 }50 .textLayer .highlight.selected {51 background-color: rgb(0, 100, 0);52 }53 .textLayer ::-moz-selection {54 background: rgb(0, 0, 255);55 }56 .textLayer ::selection {57 background: rgb(0, 0, 255);58 }59 .textLayer .endOfContent {60 display: block;61 position: absolute;62 left: 0px;63 top: 100%;64 right: 0px;65 bottom: 0px;66 z-index: -1;67 cursor: default;68 -webkit-user-select: none;69 -moz-user-select: none;70 -ms-user-select: none;71 user-select: none;72 }73 .textLayer .endOfContent.active {74 top: 0px;75 }76 .annotationLayer section {77 position: absolute;78 }79 .annotationLayer .linkAnnotation > a,80 .annotationLayer .buttonWidgetAnnotation.pushButton > a {81 position: absolute;82 font-size: 1em;83 top: 0;84 left: 0;85 width: 100%;86 height: 100%;87 }88 .annotationLayer .linkAnnotation > a:hover,89 .annotationLayer .buttonWidgetAnnotation.pushButton > a:hover {90 opacity: 0.2;91 background: #ff0;92 box-shadow: 0px 2px 10px #ff0;93 }94 .annotationLayer .textAnnotation img {95 position: absolute;96 cursor: pointer;97 }98 .annotationLayer .textWidgetAnnotation input,99 .annotationLayer .textWidgetAnnotation textarea,100 .annotationLayer .choiceWidgetAnnotation select,101 .annotationLayer .buttonWidgetAnnotation.checkBox input,102 .annotationLayer .buttonWidgetAnnotation.radioButton input {103 background-color: rgba(0, 54, 255, 0.13);104 border: 1px solid transparent;105 box-sizing: border-box;106 font-size: 9px;107 height: 100%;108 margin: 0;109 padding: 0 3px;110 vertical-align: top;111 width: 100%;112 }113 .annotationLayer .choiceWidgetAnnotation select option {114 padding: 0;115 }116 .annotationLayer .buttonWidgetAnnotation.radioButton input {117 border-radius: 50%;118 }119 .annotationLayer .textWidgetAnnotation textarea {120 font: message-box;121 font-size: 9px;122 resize: none;123 }124 .annotationLayer .textWidgetAnnotation input[disabled],125 .annotationLayer .textWidgetAnnotation textarea[disabled],126 .annotationLayer .choiceWidgetAnnotation select[disabled],127 .annotationLayer .buttonWidgetAnnotation.checkBox input[disabled],128 .annotationLayer .buttonWidgetAnnotation.radioButton input[disabled] {129 background: none;130 border: 1px solid transparent;131 cursor: not-allowed;132 }133 .annotationLayer .textWidgetAnnotation input:hover,134 .annotationLayer .textWidgetAnnotation textarea:hover,135 .annotationLayer .choiceWidgetAnnotation select:hover,136 .annotationLayer .buttonWidgetAnnotation.checkBox input:hover,137 .annotationLayer .buttonWidgetAnnotation.radioButton input:hover {138 border: 1px solid #000;139 }140 .annotationLayer .textWidgetAnnotation input:focus,141 .annotationLayer .textWidgetAnnotation textarea:focus,142 .annotationLayer .choiceWidgetAnnotation select:focus {143 background: none;144 border: 1px solid transparent;145 }146 .annotationLayer .buttonWidgetAnnotation.checkBox input:checked:before,147 .annotationLayer .buttonWidgetAnnotation.checkBox input:checked:after,148 .annotationLayer .buttonWidgetAnnotation.radioButton input:checked:before {149 background-color: #000;150 content: '';151 display: block;152 position: absolute;153 }154 .annotationLayer .buttonWidgetAnnotation.checkBox input:checked:before,155 .annotationLayer .buttonWidgetAnnotation.checkBox input:checked:after {156 height: 80%;157 left: 45%;158 width: 1px;159 }160 .annotationLayer .buttonWidgetAnnotation.checkBox input:checked:before {161 -webkit-transform: rotate(45deg);162 transform: rotate(45deg);163 }164 .annotationLayer .buttonWidgetAnnotation.checkBox input:checked:after {165 -webkit-transform: rotate(-45deg);166 transform: rotate(-45deg);167 }168 .annotationLayer .buttonWidgetAnnotation.radioButton input:checked:before {169 border-radius: 50%;170 height: 50%;171 left: 30%;172 top: 20%;173 width: 50%;174 }175 .annotationLayer .textWidgetAnnotation input.comb {176 font-family: monospace;177 padding-left: 2px;178 padding-right: 0;179 }180 .annotationLayer .textWidgetAnnotation input.comb:focus {181 /*182 * Letter spacing is placed on the right side of each character. Hence, the183 * letter spacing of the last character may be placed outside the visible184 * area, causing horizontal scrolling. We avoid this by extending the width185 * when the element has focus and revert this when it loses focus.186 */187 width: 115%;188 }189 .annotationLayer .buttonWidgetAnnotation.checkBox input,190 .annotationLayer .buttonWidgetAnnotation.radioButton input {191 -webkit-appearance: none;192 -moz-appearance: none;193 appearance: none;194 padding: 0;195 }196 .annotationLayer .popupWrapper {197 position: absolute;198 width: 20em;199 }200 .annotationLayer .popup {201 position: absolute;202 z-index: 200;203 max-width: 20em;204 background-color: #ffff99;205 box-shadow: 0px 2px 5px #888;206 border-radius: 2px;207 padding: 6px;208 margin-left: 5px;209 cursor: pointer;210 font: message-box;211 font-size: 9px;212 word-wrap: break-word;213 }214 .annotationLayer .popup > * {215 font-size: 9px;216 }217 .annotationLayer .popup h1 {218 display: inline-block;219 }220 .annotationLayer .popup span {221 display: inline-block;222 margin-left: 5px;223 }224 .annotationLayer .popup p {225 border-top: 1px solid #333;226 margin-top: 2px;227 padding-top: 2px;228 }229 .annotationLayer .highlightAnnotation,230 .annotationLayer .underlineAnnotation,231 .annotationLayer .squigglyAnnotation,232 .annotationLayer .strikeoutAnnotation,233 .annotationLayer .freeTextAnnotation,234 .annotationLayer .lineAnnotation svg line,235 .annotationLayer .squareAnnotation svg rect,236 .annotationLayer .circleAnnotation svg ellipse,237 .annotationLayer .polylineAnnotation svg polyline,238 .annotationLayer .polygonAnnotation svg polygon,239 .annotationLayer .caretAnnotation,240 .annotationLayer .inkAnnotation svg polyline,241 .annotationLayer .stampAnnotation,242 .annotationLayer .fileAttachmentAnnotation {243 cursor: pointer;244 }245 .pdfViewer .canvasWrapper {246 overflow: hidden;247 }248 .pdfViewer .page {249 direction: ltr;250 width: 816px;251 height: 1056px;252 margin: 1px auto -8px auto;253 position: relative;254 overflow: visible;255 border: 9px solid transparent;256 background-clip: content-box;257 -webkit-border-image: url(images/shadow.png) 9 9 repeat;258 -o-border-image: url(images/shadow.png) 9 9 repeat;259 border-image: url(images/shadow.png) 9 9 repeat;260 background-color: white;261 }262 .pdfViewer.removePageBorders .page {263 margin: 0px auto 10px auto;264 border: none;265 }266 .pdfViewer.singlePageView {267 display: inline-block;268 }269 .pdfViewer.singlePageView .page {270 margin: 0;271 border: none;272 }273 .pdfViewer.scrollHorizontal,274 .pdfViewer.scrollWrapped,275 .spread {276 margin-left: 3.5px;277 margin-right: 3.5px;278 text-align: center;279 }280 .pdfViewer.scrollHorizontal,281 .spread {282 white-space: nowrap;283 }284 .pdfViewer.removePageBorders,285 .pdfViewer.scrollHorizontal .spread,286 .pdfViewer.scrollWrapped .spread {287 margin-left: 0;288 margin-right: 0;289 }290 .spread .page,291 .pdfViewer.scrollHorizontal .page,292 .pdfViewer.scrollWrapped .page,293 .pdfViewer.scrollHorizontal .spread,294 .pdfViewer.scrollWrapped .spread {295 display: inline-block;296 vertical-align: middle;297 }298 .spread .page,299 .pdfViewer.scrollHorizontal .page,300 .pdfViewer.scrollWrapped .page {301 margin-left: -3.5px;302 margin-right: -3.5px;303 }304 .pdfViewer.removePageBorders .spread .page,305 .pdfViewer.removePageBorders.scrollHorizontal .page,306 .pdfViewer.removePageBorders.scrollWrapped .page {307 margin-left: 5px;308 margin-right: 5px;309 }310 .pdfViewer .page canvas {311 margin: 0;312 display: block;313 }314 .pdfViewer .page canvas[hidden] {315 display: none;316 }317 .pdfViewer .page .loadingIcon {318 position: absolute;319 display: block;320 left: 0;321 top: 0;322 right: 0;323 bottom: 0;324 background: url('images/loading-icon.gif') center no-repeat;325 }326 .pdfPresentationMode .pdfViewer {327 margin-left: 0;328 margin-right: 0;329 }330 .pdfPresentationMode .pdfViewer .page,331 .pdfPresentationMode .pdfViewer .spread {332 display: block;333 }334 .pdfPresentationMode .pdfViewer .page,335 .pdfPresentationMode .pdfViewer.removePageBorders .page {336 margin-left: auto;337 margin-right: auto;338 }339 .pdfPresentationMode:-ms-fullscreen .pdfViewer .page {340 margin-bottom: 100% !important;341 }342 .pdfPresentationMode:-webkit-full-screen .pdfViewer .page {343 margin-bottom: 100%;344 border: 0;345 }346 .pdfPresentationMode:-moz-full-screen .pdfViewer .page {347 margin-bottom: 100%;348 border: 0;349 }350 .pdfPresentationMode:fullscreen .pdfViewer .page {351 margin-bottom: 100%;352 border: 0;353 }...
Using AI Code Generation
1var wptoolkit = require('wptoolkit');2var widget = new wptoolkit.ChoiceWidgetAnnotation();3widget.addChoice('Choice 1');4widget.addChoice('Choice 2');5widget.addChoice('Choice 3');6widget.addChoice('Choice 4');7widget.addChoice('Choice 5');8widget.addChoice('Choice 6');9widget.addChoice('Choice 7');10widget.addChoice('Choice 8');11widget.addChoice('Choice 9');12widget.addChoice('Choice 10');13widget.addChoice('Choice 11');14widget.addChoice('Choice 12');15widget.addChoice('Choice 13');16widget.addChoice('Choice 14');17widget.addChoice('Choice 15');18widget.addChoice('Choice 16');19widget.addChoice('Choice 17');20widget.addChoice('Choice 18');21widget.addChoice('Choice 19');22widget.addChoice('Choice 20');23widget.addChoice('Choice 21');24widget.addChoice('Choice 22');25widget.addChoice('Choice 23');26widget.addChoice('Choice 24');27widget.addChoice('Choice 25');28widget.addChoice('Choice 26');29widget.addChoice('Choice 27');30widget.addChoice('Choice 28');31widget.addChoice('Choice 29');32widget.addChoice('Choice 30');33widget.addChoice('Choice 31');34widget.addChoice('Choice 32');35widget.addChoice('Choice 33');36widget.addChoice('Choice 34');37widget.addChoice('Choice 35');38widget.addChoice('Choice 36');39widget.addChoice('Choice 37');40widget.addChoice('Choice 38');41widget.addChoice('Choice 39');42widget.addChoice('Choice 40');43widget.addChoice('Choice 41');44widget.addChoice('Choice 42');45widget.addChoice('Choice 43');46widget.addChoice('Choice 44');47widget.addChoice('Choice 45');48widget.addChoice('Choice 46');49widget.addChoice('Choice 47');50widget.addChoice('Choice 48');51widget.addChoice('Choice 49');52widget.addChoice('Choice 50');53widget.addChoice('Choice 51');54widget.addChoice('Choice 52');55widget.addChoice('Choice 53');56widget.addChoice('Choice 54');57widget.addChoice('Choice 55');58widget.addChoice('Choice 56');59widget.addChoice('Choice 57');60widget.addChoice('Choice 58');61widget.addChoice('Choice
Using AI Code Generation
1var wptools = require('wptools');2page.get(function(err, resp) {3 page.choiceWidgetAnnotation(function(err, resp) {4 console.log(resp);5 });6});7var wptools = require('wptools');8page.get(function(err, resp) {9 page.getCoordinates(function(err, resp) {10 console.log(resp);11 });12});13var wptools = require('wptools');14page.get(function(err, resp) {15 page.getDefinition(function(err, resp) {16 console.log(resp);17 });18});19var wptools = require('wptools');20page.get(function(err, resp) {21 page.getDisambiguation(function(err, resp) {22 console.log(resp);23 });24});25var wptools = require('wptools');26page.get(function(err, resp) {27 page.getInfobox(function(err, resp) {
Using AI Code Generation
1var wptools = require('wptools');2var Promise = require('promise');3var fs = require('fs');4var request = require('request');5var async = require('async');6var _ = require('underscore');7var urlArray = [url, url2, url3, url4, url5, url6, url7, url8, url9, url10];8var getJSON = function(url, callback) {9 request(url, function(err, response, body) {10 if (err) {11 callback(err, null);12 return;13 }14 try {15 var data = JSON.parse(body);16 } catch (err) {
Using AI Code Generation
1var wptools = require('wptools');2var page = wptools.page('Barack Obama');3page.get(function(err, resp) {4 console.log(resp);5});6{ [Error: ENOENT, no such file or directory 'C:\Users\user\AppData\Roaming\npm\node_modules\wptools\wptools.js']7 path: 'C:\\Users\\user\\AppData\\Roaming\\npm\\node_modules\\wptools\\wptools.js' }
Using AI Code Generation
1var wptext = require('./wptext.js');2var text = new wptext();3text.ChoiceWidgetAnnotation();4var wptext = require('./wptext.js');5var text = new wptext();6text.ChoiceWidgetAnnotation();7var wptext = require('./wptext.js');8var text = new wptext();9text.ChoiceWidgetAnnotation();10var wptext = require('./wptext.js');11var text = new wptext();12text.ChoiceWidgetAnnotation();13var wptext = require('./wptext.js');14var text = new wptext();15text.ChoiceWidgetAnnotation();16var wptext = require('./wptext.js');17var text = new wptext();18text.ChoiceWidgetAnnotation();19var wptext = require('./wptext.js');20var text = new wptext();21text.ChoiceWidgetAnnotation();22var wptext = require('./wptext.js');23var text = new wptext();24text.ChoiceWidgetAnnotation();25var wptext = require('./wptext.js');26var text = new wptext();27text.ChoiceWidgetAnnotation();28var wptext = require('./wptext.js');29var text = new wptext();30text.ChoiceWidgetAnnotation();31var wptext = require('./wptext.js');32var text = new wptext();33text.ChoiceWidgetAnnotation();34var wptext = require('./wptext.js');35var text = new wptext();36text.ChoiceWidgetAnnotation();37var wptext = require('./wptext.js');
Using AI Code Generation
1var ChoiceWidgetAnnotation = require('wptoolkit').ChoiceWidgetAnnotation;2var choiceWidget = new ChoiceWidgetAnnotation();3choiceWidget.setChoiceValue("one");4var ChoiceWidgetAnnotation = require('wptoolkit').ChoiceWidgetAnnotation;5var choiceWidget = new ChoiceWidgetAnnotation();6choiceWidget.setChoiceValue("one");7choiceWidget.setChoiceValue("two");8choiceWidget.setChoiceValue("three");9### ChoiceWidgetAnnotation.getChoiceValue()10var ChoiceWidgetAnnotation = require('wptoolkit').ChoiceWidgetAnnotation;11var choiceWidget = new ChoiceWidgetAnnotation();12choiceWidget.setChoiceValue("one");13console.log(choiceWidget.getChoiceValue());14### ChoiceWidgetAnnotation.setChoiceExportValue()15var ChoiceWidgetAnnotation = require('wptoolkit').ChoiceWidgetAnnotation;16var choiceWidget = new ChoiceWidgetAnnotation();17choiceWidget.setChoiceExportValue("one");18### ChoiceWidgetAnnotation.getChoiceExportValue()19var ChoiceWidgetAnnotation = require('wptoolkit').ChoiceWidgetAnnotation;20var choiceWidget = new ChoiceWidgetAnnotation();21choiceWidget.setChoiceExportValue("one");22console.log(choiceWidget.getChoiceExportValue());23### ChoiceWidgetAnnotation.setChoiceCaption()24var ChoiceWidgetAnnotation = require('wptoolkit').ChoiceWidgetAnnotation;25var choiceWidget = new ChoiceWidgetAnnotation();26choiceWidget.setChoiceCaption("one");27### ChoiceWidgetAnnotation.getChoiceCaption()28var ChoiceWidgetAnnotation = require('wptoolkit').ChoiceWidgetAnnotation;
Using AI Code Generation
1var a = new ChoiceWidgetAnnotation();2a.choices = ["Choice 1", "Choice 2", "Choice 3"];3a.fieldName = "listBox";4a.rect = [100, 100, 300, 200];5a.pageNum = 1;6a.listbox = true;7a.createAnnotation();
Using AI Code Generation
1var choiceWidgetAnnotation = new ChoiceWidgetAnnotation();2choiceWidgetAnnotation.setField("ChoiceWidget1");3choiceWidgetAnnotation.setPage(1);4choiceWidgetAnnotation.setRect([100, 100, 200, 200]);5choiceWidgetAnnotation.setFlags(4);6choiceWidgetAnnotation.setAppearanceState("On");7choiceWidgetAnnotation.setAppearanceStates(["Off", "On"]);8this.addAnnot(choiceWidgetAnnotation);9this.saveAs("test.pdf", false, "pdf", true, true, true);10var textWidgetAnnotation = new TextWidgetAnnotation();11textWidgetAnnotation.setField("TextWidget1");12textWidgetAnnotation.setPage(1);13textWidgetAnnotation.setRect([100, 100, 200, 200]);14textWidgetAnnotation.setFlags(4);15textWidgetAnnotation.setAppearanceState("On");16this.addAnnot(textWidgetAnnotation);17this.saveAs("test.pdf", false, "pdf", true, true, true);18var textMarkupAnnotation = new TextMarkupAnnotation();19textMarkupAnnotation.setSubtype("Highlight");20textMarkupAnnotation.setPage(1);21textMarkupAnnotation.setRect([100, 100, 200, 200]);22textMarkupAnnotation.setQuadPoints([100, 100, 200, 100, 200, 200, 100, 200]);23this.addAnnot(textMarkupAnnotation);24this.saveAs("test.pdf", false, "pdf", true, true, true);25var freeTextAnnotation = new FreeTextAnnotation();26freeTextAnnotation.setPage(1);
Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Get 100 minutes of automation test minutes FREE!!